[prev in list] [next in list] [prev in thread] [next in thread] 

List:       slf4j-user
Subject:    Re: [slf4j-user] Using log4j renderers in slf4j
From:       Ceki Gulcu <listid () qos ! ch>
Date:       2008-03-26 20:12:31
Message-ID: 47EAAE2F.50907 () qos ! ch
[Download RAW message or body]

Hello Udo,

The log4j adapter in the slf4j-log4j12 module does not use renderers on account 
of simplicity. More importantly, given that all printing methods in 
org.slf4j.Logger take String as their message argument, it does not make sense 
to call a renderer on a message of type String.

Thus, I don't see how you could call a renderer from within SLF4J code, 
including the log4j adapter in slf4j-log4j12.

HTH,

Udo Christ wrote:
> Hi,
> 
>  i'm using slf4j with log4j as the backend lib. Both are the latest
>  release version. Is it somehow possible to keep the renderers defined in the
>  log4j config active when logging through slf4j towards log4j ?
> 
>  I do have sensitive information which may not be logged when the application
>  is live, but needs to be logged when its developed. Normally i change the 
>  renderers and thats it. Is there any other way to achieve that using slf4j ?
> 
>  My idea would be to change the Log4jAdapter and call the RenderMap.findAndRender
>  on the arguments passed into the MessageFormat. Is this not done on purpose for
>  speeds sake ?
> 
>  thanks and regards
>  udo
> 
-- 
Ceki Gülcü
QOS.ch is looking to hire talented developers in Switzerland.  If
interested, please contact c e k i @ q o s . c h

_______________________________________________
user mailing list
user@slf4j.org
http://www.slf4j.org/mailman/listinfo/user

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic