[slf4j-user] slf4j JDK - does not show the class and method that invokes the logger
Ceki Gülcü
listid at qos.ch
Fri Nov 11 19:55:41 CET 2005
At 09:18 PM 11/10/2005, Pusposuharto, Budiono wrote:
>Hi,
>
>I'm just started using slf4j. I think this is great. Thanks for putting it
>together.
Thank you. I am glad you like it.
>I have a question in regards to the JDK Logger:
>Whenever a log info is displayed, it doesn't show the class and the method
>that invokes the logger. Instead it displays
>"org.slf4j.impl.JDK14LoggerAdapter info".
>Is there any plan to make it so that it shows the real caller of the log,
>so that the output is similar to the JDK 1.4 logger as if the logger is
>invoked directly?
Unfortunately, contrary to log4j, the JDK 1.4 API does not allow the
wrapper class, in this case SLF4J, to specify that the caller is one level
higher. Commons-logging circumvents this limitation by creating an
exception, parsing it and passing the information to JDK 1.4. However, this
approach can have quite a severe performance impact, which is why SLF4J did
not adopt the same approach.
I hope this answers your question,
>
>Thanks again,
>Bud Pusposuharto
--
Ceki Gülcü
The complete log4j manual: http://www.qos.ch/log4j/
Improve your Sudoku skills at http://www.sudoku-grok.com/
More information about the slf4j-user
mailing list