[logback-user] class name is displayed incorrectly for java inner classes

David Roussel nabble at diroussel.xsmail.com
Wed Jul 17 12:27:17 CEST 2013

On 17 Jul 2013, at 11:09, Stuart Rossiter <stuart.p.rossiter at gmail.com> wrote:

> There is no .java stuffix, just the .class suffix, and it's not so ugly, in fact the IDE makes it a pretty colour!  :-)
> I was confused because the poster's log extracts clearly show SLF4JConsoleTest.java being used as the name of the logger, when he used the basic getLogger(Class clazz) form in his code.
> No access to coding platform at the mo, so I'm posting 'blind' here!

Sorry, you are right, my bad.

The %file pattern is being used, and that outputs the name of the source file.  And since the inner class is in the same source file as the outer class, the source file logged is the same.  

I've never used %file myself, as it's slow, and if you use one logger per class then you can infer the source file.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.qos.ch/pipermail/logback-user/attachments/20130717/ae5f9d23/attachment.html>

More information about the Logback-user mailing list