[slf4j-user] Use in WebSphere
Thorbjoern Ravn Andersen
ravn at runjva.com
Sat Apr 18 00:35:47 CEST 2009
Ben Tomasini skrev:
> Hello,
>
> JCL's conflicts with the default library and configuration in the WebSphere root
> classpath make it a problem child for WebSphere shops. (See
> http://wiki.apache.org/jakarta-commons/Logging/FrequentlyAskedQuestions, search
> WebSphere).
JCL has problems with non-trivial classloader scenarios with its way to
discover which logging framework to use. It is an interesting academic
exercise to figure out if it is JCL or IBM who is at fault with having a
WebSphere jar exposed to web applications.
> As I have suggested the use of SJF4J to a WebSphere shop, a common question I
> get is, "If IBM screwed up commons logging for us, what will stop them from
> doing the same with SLF4J?". Is there anything inherent in the design of SJF4J
> that makes this less likely?
slf4j uses the same kind of binding as the one that binds all your other
jars together instead of the runtime discovery method used by JCL. This
makes it very robust against classloader issues, and allow you to use
any logging framework - including JCL - as the backend.
Coding against slf4j is very easy and allows you to be independent of
any particular logging framework. That can be extremely valuable in a
situation like the WebSphere one. If you run into trouble with JCL,
switch to plain JDK logging or log4j. Your application is the same.
--
Thorbjørn Ravn Andersen "...plus... Tubular Bells!"
More information about the slf4j-user
mailing list