[logback-user] Configuring for detailed information on trace level, for entry and exit extensions
Mads Bondo Dydensborg
mbd at dbc.dk
Thu Jun 13 14:43:55 CEST 2013
Hi there.
Using
<slf4j.version>1.7.5</slf4j.version>
<logback.version>1.0.13</logback.version>
And, with the following in logback.xml:
<!-- Copy encoder from console -->
<encoder>
<!-- <pattern>%d{ISO8601} [%thread] rid:%X{trackingId} %-5level %logger{5} - %msg%n</pattern> -->
<!-- <pattern>%d{ISO8601} [%thread] rid:%X{trackingId} %-5level %logger{5}.%M:%L - %msg%n</pattern> -->
<pattern>%d{ISO8601} [%thread] rid:%X{trackingId} %-5level %class{5}.%M:%L - %msg%n</pattern>
<immediateFlush>true</immediateFlush>
<outputPatternAsHeader>true</outputPatternAsHeader>
</encoder>
This outputs
#logback.classic pattern: %d{ISO8601} [%thread] rid:%X{trackingId} %-5level %class{5}.%M:%L - %msg%n
2013-06-13 12:55:49,486 [main] rid: TRACE ?.?:? - entry
Changing to the first commented pattern, gets me:
#logback.classic pattern: %d{ISO8601} [%thread] rid:%X{trackingId} %-5level %logger{5} - %msg%n
2013-06-13 14:35:20,450 [main] rid: TRACE d.d.o.EnvironmentFactory - entry
Second commented pattern:
#logback.classic pattern: %d{ISO8601} [%thread] rid:%X{trackingId} %-5level %logger{5}.%M:%L - %msg%n
2013-06-13 14:36:37,689 [main] rid: TRACE d.d.o.EnvironmentFactory.?:? - entry
Any idea what I am doing wrong here? The point was to get method name and line numbers, as per this:
http://logback.qos.ch/manual/layouts.html#conversionWord
Any clues?
Thanks in advance.
Mads
--
Med venlig hilsen/Regards
Chefarkitekt/Chief Architect cand.scient.dat, Ph.d., Mads Bondo Dydensborg
Dansk BiblioteksCenter A/S, Tempovej 7-11, 2750 Ballerup, Tlf. +45 29 84 00 42
More information about the Logback-user
mailing list