On Sep 6, 2008, at 9:11 AM, Thomas Wiedmann wrote:
> Hello,
>
> in the ...layout.ConversionPattern of a DailyRollingFileAppender the
> %M parameter is defined to output the name of the method where the
> logging was triggered. In some logfiles instead of the real method
> name the entry 'java' is found. What may be the reason for this
> behaviour and how to achieve the output of the name of the
> triggering method?
>
> Thomas Wiedmann
>
Prior to JDK 1.4, there was not a mechanism to determine the stack
trace without parsing the output of Throwable.printStackTrace().
Different JVM's generate slightly different output and may potentially
confuse the stack trace parser. The current SVN HEAD will detect when
running on a JDK 1.4 and later and use Throwable.getStackTrace() and
should be immune to formatting issues. Previous versions of log4j
have had some incremental improvement in stack trace parsing (JRockit
and GCJ in particular had issues). If you are using a much older
version updating to log4j 1.2.15 may help. log4j 1.2.16 with the
conditional use of JDK 1.4 methods should be released shortly.
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org
|