Does anybody have any numbers on the performance impact of using the "M"
conversion character?  We recently had a problem in an application where the
overall application performance was affected by a factor of 500% by the use
of a stack trace internally by one component.  I would expect that "M" would
have a similar impact.  Creating exceptions is relatively light but
printStackTrace is extremely expensive.

I would be extremely hesitant to use this approach.  If the method name is
absolutely required, it may be better to design a log4j wrapper that
mandates the use of a methodName argument.

-----Original Message-----
From: RUTHERFURD, Michael [mailto:[EMAIL PROTECTED]
Sent: Wednesday, 4 June 2003 11:18 AM
To: Log4J Users List
Subject: RE: Conversion Character M


I've had this problem running WebSphere 3.02 on an AS400. In my case it was
caused by an non-standard stack trace. I customised the parsing and the
problem went away.

Michael Rutherfurd

> i am trying to use the conversion character "M" for outputting the method
> name where the logging request was issued.
> unfortunately all log4j wirtes to the logfile is ?... the conversion
> configuration is the following:
>
> value="%d{dd.MM.yyyy HH:mm:ss} %r [%t] *%-5p %-17c{2} [%M] - %m%n"
>
> the log-statements are all of the following:
>
> 02.06.2003 10:45:52 5508343 [HttpListener-1:Thread-3] *DEBUG
> persistence.AbstractDBMapper [?] - Method execute called...
>
> any ideas?
>
> kind regards,
> sandro

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to