logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Goran Karlic <goran.kar...@gmail.com>
Subject Re: Redirect log4j to JUL
Date Mon, 05 Jan 2015 14:09:43 GMT
Hi Shawn,

I looked into SLF4J - it seems an overkill for the situation: around 95% of logs are JUL,
maybe 5% log4j.

Adding multiple SLF4J jars for that 5% with their overhead is not really an option -- But
I'll think about it anyway, since it seems the only "fair" solution.

I'll ask the dev of that module to switch from log4j to JUL, seems the simplest solution (never
would have thought that before - but one can always learn :-)

Thank you!


> On 05 Jan 2015, at 21:53, Shawn Heisey <apache@elyograg.org> wrote:
> 
>> On 1/4/2015 11:13 PM, Goran Karlic wrote:
>> How can I configure log4j to redirect output to java.util.logging?
> 
> One way to do this (and it might be the only way) is to use slf4j for
> your logging, and bind JUL as the logging destination.
> 
> The slf4j download includes what I call "intercept" jars -- jars that
> implement other logging classes like log4j, commons logging, JUL, etc,
> and redirect the logs into slf4j so that they are handled by whatever
> binding you have chosen.
> 
> As long as the logs you need to redirect are log4j 1.x, this is possible
> with software from www.slf4j.org.  There may be a jar within the log4j
> 2.x download that will work with version 2.x, but I'm not entirely sure.
> 
> Here's some documentation I wrote for the Solr project on the topic of
> intercept jars:
> 
> http://wiki.apache.org/solr/SolrLogging#A_note_about_SLF4J_intercept_jars
> 
> Thanks,
> Shawn
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
> 

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


Mime
View raw message