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-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-dev-h...@logging.apache.org

Reply via email to