Re: looking for source

2016-11-06 Thread Nicholas Duane
Great, that explains it. Thanks, Nick From: Ralph Goers <ralph.go...@dslextreme.com> Sent: Sunday, November 6, 2016 8:14 PM To: Log4J Users List Subject: Re: looking for source Because most people want the exception printed PatternLayout in

Re: looking for source

2016-11-06 Thread Ralph Goers
ception info, but > I guess it might already be in the Message object. > > > Thanks, > > Nick > > > From: Ralph Goers <ralph.go...@dslextreme.com> > Sent: Sunday, November 6, 2016 1:38 AM > To: Log4J Users List > Subject: Re:

Re: looking for source

2016-11-06 Thread Nicholas Duane
. Thanks, Nick From: Ralph Goers <ralph.go...@dslextreme.com> Sent: Sunday, November 6, 2016 1:38 AM To: Log4J Users List Subject: Re: looking for source If you look at PatternLayout you will see a few choices for how the Exception gets formatted. %e

Re: looking for source

2016-11-05 Thread Ralph Goers
; exceptionAsString; > > > Thanks, > > Nick > > > From: Remko Popma <remko.po...@gmail.com <mailto:remko.po...@gmail.com>> > Sent: Saturday, November 5, 2016 9:16 PM > To: Log4J Users List > Subject: Re: looki

Re: looking for source

2016-11-05 Thread Remko Popma
, as we're seeing with our appender/layout. > > > Thanks, > > Nick > > > From: Remko Popma <remko.po...@gmail.com> > Sent: Saturday, November 5, 2016 10:03 PM > To: Log4J Users List > Subject: Re: looking for source > > Nick, > > If you want

Re: looking for source

2016-11-05 Thread Nicholas Duane
s List Subject: Re: looking for source Nick, If you want to combine the formatted message string and the stack trace into a single string in your layout then yes, that is one way to do that. For reference, take a look at the MessagePatternConverter and ThrowablePatternConverter (used by L

Re: looking for source

2016-11-05 Thread Remko Popma
, > > Nick > > > From: Remko Popma <remko.po...@gmail.com> > Sent: Saturday, November 5, 2016 9:16 PM > To: Log4J Users List > Subject: Re: looking for source > > The point is that in a custom layout/appender you should get

Re: looking for source

2016-11-05 Thread Nicholas Duane
Thanks, Nick From: Remko Popma <remko.po...@gmail.com> Sent: Saturday, November 5, 2016 9:16 PM To: Log4J Users List Subject: Re: looking for source The point is that in a custom layout/appender you should get the throwable from the LogEvent, not from the Message. That is the desi

Re: looking for source

2016-11-05 Thread Remko Popma
eption. > > > Thanks, > > Nick > > > From: Remko Popma <remko.po...@gmail.com> > Sent: Friday, November 4, 2016 9:58 PM > To: Log4J Users List > Subject: Re: looking for source > > The Throwable is initially captured in the Message

Re: looking for source

2016-11-05 Thread Nicholas Duane
6 9:58 PM To: Log4J Users List Subject: Re: looking for source The Throwable is initially captured in the Message (usually ParameterizedMessage or its garbage-free equivalent), but is later transferred to the LogEvent. By the time the LogEvent reaches the Layout, the Message instan

Re: looking for source

2016-11-04 Thread Nicholas Duane
__ From: Remko Popma <remko.po...@gmail.com> Sent: Friday, November 4, 2016 10:42 AM To: Log4J Users List Subject: Re: looking for source Sure. Start in AbstractLogger in the API module: https://github.com/apache/logging-log4j2/blob/master/log4j-api/src/main/java/org/apache/

Re: looking for source

2016-11-04 Thread Remko Popma
Sure. Start in AbstractLogger in the API module: https://github.com/apache/logging-log4j2/blob/master/log4j-api/src/main/java/org/apache/logging/log4j/spi/AbstractLogger.java and at some point you probably also want to look at the concrete subclass Logger in the core module:

Re: looking for source

2016-11-04 Thread Apostolis Giannakidis
Hi, The code is available in Github and you can clone it: https://github.com/apache/logging-log4j2/blob/f3e876a0fefd5d77c6f278b073bfa15df7971c44/log4j-api/src/main/java/org/apache/logging/log4j/spi/AbstractLogger.java On Fri, Nov 4, 2016 at 2:32 PM, Matt Sicker wrote: >