[slf4j-user] JUL to SLF4J

Boris Unckel boris.unckel.mlg at gmx.net
Wed Mar 7 09:36:39 CET 2007


Hello Christian,
>   Driven by need (and already startet this discussion here [1]),
>   I'd like to know, how to capture and redirect JUL[2] log calls
>   over to SLF4J.
> 
>   Am I missing something? Is it possible?
> 
This is easy for smart clients where just the system classloader is loading all necessary classes. In Java EE environments you would have to put the JUL classes which do the redirect, SLF4J api and SLF4J implementation and the needed logging backend (like log4j or logback) on the system classpath.
This is possible in some Java EE environments but not very nice...

Have a look at www.x4juli.org it does implement SLF4J, JCL (naturally JUL) natively and has a System.out / System.err redirect capability.
The sample WAR in x4juli is corrupt, I had no time to fix it.

Regards
Boris



More information about the slf4j-user mailing list