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