[slf4j-user] Using log4j renderers in slf4j
Ceki Gulcu
listid at qos.ch
Wed Mar 26 21:12:31 CET 2008
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
More information about the slf4j-user
mailing list