RE: feature request: logging a stack trace

2002-08-01 Thread Hein Meling
I knew about the location info stuff, but this applies to all messages logged, and that will clearly affect performance even more than doing it for just a few log messages. Also, the location info does not include the entire stack trace, thus making it difficult to trace the entire chain of

RE: feature request: logging a stack trace

2002-08-01 Thread Ceki Gülcü
Hmm, you are not aware of the debug(Object, Throwable) method in Logger class, are you? You can just write: log.debug(genereting stack trace, new Exception()); At 15:10 01.08.2002 +0200, you wrote: I knew about the location info stuff, but this applies to all messages logged, and

RE: feature request: logging a stack trace

2002-07-30 Thread Jon Skeet
my implementation (residing in a class called Debug) is very rough so, it needs a bit of cleaning up to fit well into log4j: public static void logStackTrace(org.apache.log4j.Logger log) { try { throw new Exception(); } catch (Exception e) { StringWriter

RE: feature request: logging a stack trace

2002-07-30 Thread Mark Womack
Logging events also support something called location info. It records where the event was logged from and can be displayed via the PatternLayout (see the javadoc for details). It displays the stack from where the logging event was recorded. All you have to do is use the correct conversion