I seem to be having a problem getting logging to work correctly. I use hibernate as my persistence provider which uses SLF4J for logging. Glassfish V3 uses the JDK logging while my project uses log4j and I don't want to change it to one of the above mentioned loggers. To get SLF4J and log4j to play nicely I included the slf-log4j.jar on my class path but now I end up with these messages:
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/C:/java/lib/slf4j-log4j12-1.5.8.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/C:/java/tools/glassfishv3/glassfish/modules/bean-validator.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/C:/java/tools/glassfishv3/glassfish/modules/weld-osgi-bundle.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See
http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
Obviously I cannot remove the bindings the the glassfish jar files does that mean I have no choice but the use the JDK logger? I have found various guides using Google but none of them seem to work in my situation.
[Message sent by forum member 'cain05']
http://forums.java.net/jive/thread.jspa?messageID=480480