Re: Translating log levels

2015-05-20 Thread Mikael Ståldal
From: Ralph Goers ralph.go...@dslextreme.com Date: 05/19/2015 10:50 (GMT-08:00) To: Log4J Users List log4j-user@logging.apache.org Subject: Re: Translating log levels I am assuming you want the Level in the output to say WARN instead of ERROR - otherwise simple filtering at the Logger would get

Re: Translating log levels

2015-05-20 Thread Mikael Ståldal
@logging.apache.org Subject: Re: Translating log levels I am assuming you want the Level in the output to say WARN instead of ERROR - otherwise simple filtering at the Logger would get you the output. You can use the RewriteAppender to modify the Level to what you want. Ralph On May 19, 2015, at 8:10 AM

Re: Translating log levels

2015-05-19 Thread Gary Gregory
You can use loggers and filters (see org.apache.logging.log4j.core.filter.DynamicThresholdFilter, ThresholdFilter and others) to only log what you want but I am pretty sure you cannot change the level of a message in flight. A custom org.apache.logging.log4j.message.MessageFactory would do it

Translating log levels

2015-05-19 Thread Mikael Ståldal
Is it possible to translate log levels in the configuration. I have some 3rd party libraries who log stuff on too high level, so I would need a way to say that logging from com.somecompany.funlibrary on level ERROR should be translated to WARN. -- [image: MagineTV] *Mikael Ståldal* Senior

Re: Translating log levels

2015-05-19 Thread Gary Gregory
Do you need a custom RewritePolicy? Gary  Original message From: Ralph Goers ralph.go...@dslextreme.com Date: 05/19/2015 10:50 (GMT-08:00) To: Log4J Users List log4j-user@logging.apache.org Subject: Re: Translating log levels I am assuming you want the Level in the output

Re: Translating log levels

2015-05-19 Thread Ralph Goers
I am assuming you want the Level in the output to say WARN instead of ERROR - otherwise simple filtering at the Logger would get you the output. You can use the RewriteAppender to modify the Level to what you want. Ralph On May 19, 2015, at 8:10 AM, Mikael Ståldal mikael.stal...@magine.com