[logback-user] class & line conversion words not working

Chris Cheshire cheshirator at gmail.com
Thu Feb 23 16:05:38 CET 2012


Reposting.

This is what the pattern layout produces for the %class and %line
tokens now. Prior to v1.0, it had the full class name and line # where
the logging message was generated.

Class : ?
Line : ?

What do I need to change in the config to get this working now? I am
using logback v1.0 and slf4j v1.6.4.

Chris


On Wed, Dec 7, 2011 at 3:49 PM, Chris Cheshire <cheshirator at gmail.com> wrote:
> I have just upgraded to logback 1.0 (from 0.9.x), and now the
> conversion words for %class and %line just produce a question mark.
>
> My pattern layout is
>
>    <layout class="ch.qos.logback.classic.PatternLayout">
>      <Pattern>%date [%thread] %-5level %logger %n%n Class : %class%n
> Line : %line%n%n%message%n</Pattern>
>    </layout>
>
>
> Prior to the update this was working and now it's not. Everything else
> in the layout displays as specified, except %class and %line. I do
> have the java compiler generating debug information too.
>
> Any suggestions?
>
> Chris


More information about the Logback-user mailing list