logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thorbjørn Ravn Andersen <nospam0...@gmail.com>
Subject Re: Improving log4j so it can easily be used with servlet logging
Date Mon, 31 May 2010 20:28:10 GMT
Den 30/05/10 23.12, Curt Arnold skrev:
> I don't have this in code or in the JIRA, but I have mentioned in 
> recent threads the idea of a user-supplied context object in logging 
> calls. Currently log4j has a thread associated context (the MDC and 
> NDC) and there are JVM level context (line ending separator), but 
> there is no concept of a user-supplied context unless embedded in the 
> message parameter.
> In this case, the logging call is operating in the "context" of the servlet request,
and you could do pass the servlet as the user-context object.  A servlet appender could check
if the user context object was a Servlet and if so delegate to its log method.  We could also
add patterns for %ipaddr, %ipport, etc, that would attempt to recognize the user-context object
and extract that info if it could recognize the type.
>    
I am unsure of what you describe. Could you write some pseudocode 
showing what you mean?

-- 
   Thorbjørn Ravn Andersen  "...plus... Tubular Bells!"


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


Mime
View raw message