[slf4j-user] java.util.logging.LogManager Implementation?
Boris Unckel
boris.unckel.mlg at gmx.net
Mon May 14 23:30:58 CEST 2007
Hello Cameron,
Cameron Taggart wrote:
> Is it possible to java.util.logging log statements go through SLF4J?
> I though may be SLF4J would have a java.util.logging.LogManager
> implementation that I could set with the System property of
> "java.util.logging.manager".
>
> x4juli has something like this, but I'm currently using log4j and
> looking at logback.
> http://www.x4juli.org/api/org/x4juli/X4JuliLogManager.html
there is one great problem with any approach of using a
filter/handler/special logger (in JUL terms) to
send log statements to any other backend than JUL (Plain JDK JUL, x4juli
or any other) - the need for the system classloader.
This problem is small in standalone applications (what about spring in
this case - I don't know), but it is
very important in J2EE environments. Any logging backend needs to
resists on the system classloader
or the filter/handler/special logger has to deal with it. You cannot set
the special "frontend" or "bridge"
class on the system classloader and receive the logrecords (in log4j
terms logevents) somewhere in child
classloaders without heavily playing around with the classloader
hierarchy or using something with performance
issues like a port communication.
Some application servers provide their own JUL implementation (i.E.
WebSphere 6.x) and you cannot change
the "java.util.logging.manager" without breaking the system.
Offtopic: It is very interesting to play with JAD and those classes :-)
Please describe your use case to make the mailing list readers
understand your environment and goal.
Regards
Boris
More information about the slf4j-user
mailing list