logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Gregory <garydgreg...@gmail.com>
Subject Re: Translating log levels
Date Tue, 19 May 2015 15:29:33 GMT
You can use loggers and filters (see
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 since
it does not take a Level...

Patches welcome? :-)

What would a sample configuration look like?


On Tue, May 19, 2015 at 8:10 AM, Mikael Ståldal <mikael.staldal@magine.com>

> 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 backend developer
>  *Magine TV*
>  mikael.staldal@magine.com
>  Regeringsgatan 25  | 111 53 Stockholm, Sweden  |   www.magine.com
>  Privileged and/or Confidential Information may be contained in this
> message. If you are not the addressee indicated in this message
> (or responsible for delivery of the message to such a person), you may not
> copy or deliver this message to anyone. In such case,
> you should destroy this message and kindly notify the sender by reply
> email.

E-Mail: garydgregory@gmail.com | ggregory@apache.org
Java Persistence with Hibernate, Second Edition
JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
Spring Batch in Action <http://www.manning.com/templier/>
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message