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 Terence Ingram <te...@socialchange.net.au> on 2003/06/17 02:33:30 UTC

ASYNC Appender not printing line or class information

I have searched the archives for a resolution to this problem and the only
reference is:
http://www.mail-archive.com/log4j-user@jakarta.apache.org/msg06540.html
which does not appear to have a resolution.

My problem. I have upgraded to log4j 1.2.8 I am using the Async appender and
then sending all messages to STDOUT and a file. Below is an example of my
log4j.xml file. The interesting point is that the information for switches
%L, %F, %M all produce the deadly or rather infamous "?"".

I have read the documentation stating that potentially I need to ensure that
my compiled code does not use the -O option. Fine. It doesn't. I tried
another test by not using the ASYNC Appender i.e. just pumping the output to
the CONSOLE. The information for the offending switches is then returned.

This has the same behaviour on windows and linux.

My question is: What's the deal the this ASYNC appender. How can this be
remedied?

Terence

<?xml version="1.0" encoding="UTF-8"?>
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"
debug="true">
 <appender name="ASYNC" class="org.apache.log4j.AsyncAppender">
  <appender-ref ref="TEMP"/>
  <appender-ref ref="CONSOLE"/>
 </appender>
 <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
  <layout class="org.apache.log4j.PatternLayout">
   <param name="ConversionPattern" value="%d{ISO8601} %5p [%t] %-2c
(%F:%L) - %m%n"/>
  </layout>
 </appender>
 <appender name="TEMP" class="org.apache.log4j.FileAppender">
  <param name="File" value="c:\\temp\\mylogfile.log"/>
  <layout class="org.apache.log4j.PatternLayout">
   <param name="ConversionPattern" value="%d{ISO8601} %r %-5p [%t] %x
%-2c#%M (%F:%L) - %m\n"/>
  </layout>
 </appender>
 <root>
  <priority value="debug"/>
  <appender-ref ref="ASYNC"/>
 </root>
</log4j:configuration>



---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org