logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Woonsan Ko <woon_...@yahoo.com>
Subject Lookup support for JNDI resources?
Date Wed, 17 Jul 2013 15:27:30 GMT
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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message