I'm trying to enable logging with slf4j 1.6.1 in JBoss 6.1 final and have run in to many problems, read many articles on Google and on here, and have ended up confused with logging still not working. The errors I get are either:
11:20:16,256 ERROR [STDERR] SLF4J: Failed to load class "org.slf4j.impl.StaticLo
ggerBinder".
11:20:16,256 ERROR [STDERR] SLF4J: Defaulting to no-operation (NOP) logger imple
mentation
11:20:16,256 ERROR [STDERR] SLF4J: See http://www.slf4j.org/codes.html#StaticLog
gerBinder for further details.
or
11:24:13,578 ERROR [STDERR] SLF4J: Class path contains multiple SLF4J bindings.
11:24:13,578 ERROR [STDERR] SLF4J: Found binding in [vfs:/C:/jboss-6.1.0.Final/c
ommon/lib/slf4j-jboss-logmanager.jar/org/slf4j/impl/StaticLoggerBinder.class]
11:24:13,578 ERROR [STDERR] SLF4J: Found binding in [vfs:/C:/jboss-6.1.0.Final/c
ommon/lib/slf4j-log4j12-1.6.1.jar/org/slf4j/impl/StaticLoggerBinder.class]
11:24:13,578 ERROR [STDERR] SLF4J: See http://www.slf4j.org/codes.html#multiple_
bindings for an explanation.
or I can manage to make these errors go away but still have no logging.
The first error block happens when I try putting slf4j-api-1.6.1.jar
in [jboss home]/lib/endorsed as well as WEB-INF/lib and also common/lib
The second block happens when I delete the slf4j jar from 'endorsed' and have it only in common/lib and WEB-INF/lib. I then tried deleting the version inside the webapp's WEB-INF/lib folder and then there are no errors, but still no logging. I have tried going into jboss-logging.xml and changing the root-logger section to DEBUG and also creating a jboss-logging.xml file in my webapp's WEB-INF folder, with its own root logger set to DEBUG.
Despite all of this I still get no logs appearing, and I'm no longer sure which of these steps are compatible and if I'm still missing something. Any suggestions are appreciated!