logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ralph Goers <ralph.go...@dslextreme.com>
Subject Re: Applying MDC to stacktraces
Date Wed, 28 Oct 2015 14:11:01 GMT
A couple of new features have been added that should help you:
1. Log4j now supports a PatternSelector so you can have multiple patterns specified for an
appender.
2. A new unreleased feature (it will be in 2.5) is the ability to using Scripting on the PatternSelector.
 With that you can write a script and if the LogEvent contains an exception then you would
choose the Pattern that includes the MDC information.

Ralph

> On Oct 28, 2015, at 3:56 AM, Paul Sowden <psowden@gmail.com> wrote:
> 
> Hi folks,
> 
> I'm looking to migrate from log4j1 to 2 and i'm wondering if there's any way of making
MDC prefixes appear on all stack trace lines. In 1 I had to override subAppend in RollingFileAppender
and I'm hoping I don't need to go through similar pain in 2.
> 
> Thanks
> Paul



---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


Mime
View raw message