logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ralph Goers <ralph.go...@dslextreme.com>
Subject Re: Lookup support for JNDI resources?
Date Wed, 17 Jul 2013 15:46:14 GMT
You would need to create a JNDILookup plugin.  This should be easy to do.  I would suggest
you create a Jira issue to request this.  If you could supply the patch that would be great
but if not it should be pretty easy to implement.

Ralph


On Jul 17, 2013, at 8:27 AM, Woonsan Ko wrote:

> Hi,
> 
> I'd like to use RoutingAppender [1] to put all the logs from the same web application
context in a log file  (a log file per web application context).
> 
> I think I can achieve almost the same feature as logback SiftingAppender [2] with that,
but I have one problem.
> I want to use JNDI resources look up somehow to determine the target route like logback
JNDI context selector [3].
> However, I couldn't find information to use lookups from JNDI resources in [4].
> The reason why I prefer JNDI resources instead of MDC is that I don't have to add any
code to put an MDC property in a thread and JNDI resource lookup will always work even in
a separate thread without caring thread context variables.
> Is there any way to achieve this with JNDI or something else? Or can it be something
to improve?
> 
> Regards,
> 
> Woonsan
> 
> 
> [1] http://logging.apache.org/log4j/2.x/manual/appenders.html#RoutingAppender
> [2] http://logback.qos.ch/manual/appenders.html#SiftingAppender
> [3] http://logback.qos.ch/manual/contextSelector.html
> [4] http://logging.apache.org/log4j/2.x/manual/lookups.html


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


Mime
View raw message