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 Thomas Tuft Muller <tt...@online.no> on 2001/12/11 11:03:08 UTC
Missing class/method/linenumber info (Log4J 1.1.3)
Log4j gurus,
I can't seem to get the class/method/linenumber information in my root
category, even though they show up in all the other (specific) appenders.
Excerpt from config-file:
<!-- Root category -->
<root>
<Priority value="debug" />
<appender-ref ref="ASYNC-MAIN" />
</root>
<appender name="ASYNC-MAIN" class="org.apache.log4j.AsyncAppender">
<appender-ref ref="MAIN" />
<appender-ref ref="SMTP_ONRELAY" />
<appender-ref ref="ONRELAY_LOG_SERVER" />
<appender-ref ref="SNMP_INFO" />
</appender>
<!-- Main appender -->
<appender name="MAIN"
class="org.apache.log4j.CompositeRollingAppender">
<param name="File" value="${mbx.home}/log/mbx.log" />
<param name="Append" value="false" />
<param name="RollingStyle" value="3" />
<param name="CountDirection" value="-1" />
<param name="StaticLogFileName" value="true" />
<param name="DatePattern" value="'.'yyyy-MM-dd" />
<param name="MaxFileSize" value="5242880" />
<param name="MaxSizeRollBackups" value="7" />
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern"
value="%d{ABSOLUTE} [%-10c] [%-8t] [%C{1}.%M():%L] - "%m"%n"
/>
</layout>
</appender>
Now, "mbx.log" will give [?.?():?] for [%C{1}.%M():%L] for log-entries
originally appended to child appenders, whilst the defined sink for the
children will show this info just fine. Any ideas why?
Log4j version: 1.1.3
OS: Win2k, Service Pack II
java version "1.3.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-C)
Java HotSpot(TM) Server VM (build 2.0fcs-E, mixed mode)
Regards,
--
Thomas
*************************************************************************
Copyright ERA Technology Ltd. 2001. (www.era.co.uk). All rights reserved.
Confidential. No liability whatsoever is accepted for any loss or damage
suffered as a result of accessing this message or any attachments.
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Missing class/method/linenumber info (Log4J 1.1.3)
Posted by Ceki Gulcu <ce...@yahoo.com>.
Hello Thomas,
Setting the LocationInfo property in AsyncAppender
should solve it. As in
<appender name="ASYNC-MAIN"
class="org.apache.log4j.AsyncAppender">
<param name="LocationInfo" value="true" />
<appender-ref ref="MAIN" />
...
</appender>
HTH, Ceki
--- Thomas Tuft Muller <tt...@online.no> wrote:
> Log4j gurus,
>
> I can't seem to get the class/method/linenumber
> information in my root
> category, even though they show up in all the other
> (specific) appenders.
>
> Excerpt from config-file:
>
> <!-- Root category -->
> <root>
> <Priority value="debug" />
> <appender-ref ref="ASYNC-MAIN" />
> </root>
>
> <appender name="ASYNC-MAIN"
> class="org.apache.log4j.AsyncAppender">
> <appender-ref ref="MAIN" />
> <appender-ref ref="SMTP_ONRELAY" />
> <appender-ref ref="ONRELAY_LOG_SERVER" />
> <appender-ref ref="SNMP_INFO" />
> </appender>
>
> <!-- Main appender -->
> <appender name="MAIN"
>
> class="org.apache.log4j.CompositeRollingAppender">
> <param name="File" value="${mbx.home}/log/mbx.log"
> />
> <param name="Append" value="false" />
> <param name="RollingStyle" value="3" />
> <param name="CountDirection" value="-1" />
> <param name="StaticLogFileName" value="true" />
> <param name="DatePattern" value="'.'yyyy-MM-dd" />
> <param name="MaxFileSize" value="5242880" />
> <param name="MaxSizeRollBackups" value="7" />
> <layout class="org.apache.log4j.PatternLayout">
> <param name="ConversionPattern"
> value="%d{ABSOLUTE} [%-10c] [%-8t]
> [%C{1}.%M():%L] - "%m"%n"
> />
> </layout>
> </appender>
>
> Now, "mbx.log" will give [?.?():?] for
> [%C{1}.%M():%L] for log-entries
> originally appended to child appenders, whilst the
> defined sink for the
> children will show this info just fine. Any ideas
> why?
>
> Log4j version: 1.1.3
> OS: Win2k, Service Pack II
> java version "1.3.0"
> Java(TM) 2 Runtime Environment, Standard Edition
> (build 1.3.0-C)
> Java HotSpot(TM) Server VM (build 2.0fcs-E, mixed
> mode)
>
> Regards,
>
> --
>
> Thomas
>
>
>
>
>
>
>
*************************************************************************
> Copyright ERA Technology Ltd. 2001. (www.era.co.uk).
> All rights reserved.
> Confidential. No liability whatsoever is accepted
> for any loss or damage
> suffered as a result of accessing this message or
> any attachments.
>
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>
__________________________________________________
Do You Yahoo!?
Check out Yahoo! Shopping and Yahoo! Auctions for all of
your unique holiday gifts! Buy at http://shopping.yahoo.com
or bid at http://auctions.yahoo.com
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>