You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Andy McBride <an...@dsl.pipex.com> on 2005/09/26 20:11:36 UTC
RE: TRACE location information using PatternLayout (Log4j 1.2.12)
Hi,
I raised this bug on Saturday:
http://issues.apache.org/bugzilla/show_bug.cgi?id=36800
Regards
Andy
> -----Original Message-----
> From: Paul Vaillancourt [mailto:paul.vaillancourt@ipunwired.com]
> Sent: 26 September 2005 19:19
> To: Log4j Mailing List
> Subject: TRACE location information using PatternLayout (Log4j 1.2.12)
>
> Hi All,
>
> I'm trying to print out the location information (via the %l conversion
> character) of the newly implemented TRACE level using PatternLayout
> but for some reason when I try to output the location, nothing shows up.
> I tried to put the information together myself by using %c (category),
> %L (line number) and %M (method name) but %c is the only one that works;
> the others print out the '?' character.
>
> Here's my xml block that tries to print out this information.
>
> <appender name="TRACE_ONLY" class="org.apache.log4j.ConsoleAppender">
> <layout class="org.apache.log4j.PatternLayout">
> <param name="ConversionPattern" value="%l %c %L %M - %m"/>
> </layout>
> <filter class="org.apache.log4j.varia.LevelMatchFilter">
> <param name="LevelToMatch" value="trace" />
> <param name="AcceptOnMatch" value="true" />
> </filter>
> <filter class="org.apache.log4j.varia.DenyAllFilter"/>
> </appender>
>
> The only thing that is printed out here is the category (%c) and the
> message (%m).
> E.g. package.name ? ? - Test message.
> Notice that %l doesn't even print out the '?' character, unlike %L and %M.
> If I change the level to DEBUG, everything works fine.
>
> Any ideas?
>
> TIA,
> Paul V
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org