logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Woonsan Ko <woon_...@yahoo.com>
Subject Re: Lookup support for JNDI resources?
Date Wed, 17 Jul 2013 16:28:27 GMT
Thanks, Ralph!
I'll be happily trying to post a patch soon in the following JIRA issue:
- https://issues.apache.org/jira/browse/LOG4J2-313

Cheers,

Woonsan





>________________________________
> From: Ralph Goers <ralph.goers@dslextreme.com>
>To: Log4J Users List <log4j-user@logging.apache.org>; Woonsan Ko <woon_san@yahoo.com>

>Sent: Wednesday, July 17, 2013 11:46 AM
>Subject: Re: Lookup support for JNDI resources?
> 
>
>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
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message