Oki, I understand. txs 4 the explanation!
LieGrue, strub --- On Tue, 6/21/11, Joern Huxhorn <jhuxh...@googlemail.com> wrote: > From: Joern Huxhorn <jhuxh...@googlemail.com> > Subject: Re: log4j-2.0 questions > To: "Log4J Developers List" <log4j-dev@logging.apache.org> > Date: Tuesday, June 21, 2011, 9:39 AM > > On 20.06.2011, at 23:33, ralph.goers @dslextreme.com > wrote: > > > Hey Mark, thanks for parThere are two cases here. In > the first the method signature includes a Throwable. In that > case it is unambiguous and is handled properly. In the > second case, Joern Huxhorn provided the ParameterizedMessage > class that detects that the last Object in the array is a > Throwable and handles it. However, there is an oddity > that in some cases the Throwable appears in the > ParameterizedMessage isn't propagated to the LogEvent > correctly. I'll create a test for that and fix it. > > Theres an issue in ParameterizedMessage? Please let me know > of anything you find out! > I tested that class quite thoroughly... > > The fact, that ("{}", someThrowable) does not propagate the > Throwable to the event, is by design. It is only used as the > Throwable of the message if it is not "used up" by a > placeholder. > Otherwise, it wouldn't be possible to simply use > throwable.toString() as a parameter to the message without > also creating a pretty big Throwable including stacktrace, > cause, etc. > > Cheers, > Joern. > --------------------------------------------------------------------- > To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org > For additional commands, e-mail: log4j-dev-h...@logging.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org For additional commands, e-mail: log4j-dev-h...@logging.apache.org