2006/3/3, Boris Unckel <[EMAIL PROTECTED]>: > > The example code shown here http://www.slf4j.org/manual.html stores > > the Logger instance into a * non-static field *. Is it still harmful to > > store > > the Logger instance into a static field as well as JCL? > I think yes. If you sharing a class via a shared/common classloader > (Tomcat), linked/non-hierarchical classloaders (JBoss, WAS) you will get > problems with static logging fields. > This has nothing to do with statically linked/dynamically linked logging > wrapper but with the TCCL.
Thank you for your answer. BTW, I'm not fully understand the cause of this problem (just avoid it). Is there any document that describes the cause of this problem? I've searched mailing list archives of JCL and SLF4J and in vain. The following document is really helpful for me to understand the class loader issues. Unfortunately, it does not talk about the static field problem, though. http://www.qos.ch/logging/classloader.jsp -- Ruimo Uno (Shisei Hanai) _______________________________________________ user mailing list [email protected] http://slf4j.org/mailman/listinfo/user
