JBossAS does not "use" Commons Logging per se; it is supported but is not the basis of logging. As of JBossAS 5, applications may choose to use slf4j, log4j, commons-logging, JBoss-logging, or java.util.logging, or any framework which logs to or via any of these, and all log messages will go to the same log.
One doesn't, generally. SLF4J is not a logging backend or service, it's an API. Applications using slf4j should "work" when run inside of JBossAS in that their logged messages will appear in the log at the expected levels. The real question would be "how does one configure JBoss AS 5.1.0 to use LogBack?". The answer to that is, one doesn't; log4j is the only supported logging backend in all AS 5.x releases.
In your other thread you mention using a logback log viewer. Have you considered setting up a log format which is equivalent to whatever the format LogBack is using?
Let me know if this is accurate. In Jboss 5.x, I have a war file using slfj4. All I need to do is deploy that app with the slf4j jar files included in its WEB-INF/lib? Jboss will take over and route the logging through the Log4j backed? Or, will I need to take percation not to include logging libraries such as slf4j? Also, do I need to make sure I don't include my own version of Log4j.jar as that will collide with the one packaged with Jboss correct?
On Jboss 4.2.x we have to take these precautions.
You should only include your own log4j.jar and slf4j*.jar if you are opting to not use the JBossAS logging mechanism. If you want to use the main server log, do not include any logging JARs as all of the major APIs are provided by the AS.
It seems to me that on JBoss AS 5.1 it doesn't work correctly. I got ear application with ehcache jars in APP-inf/lib subdirectory .
Ehcache uses sl4j and I can't configure and enable this logging with jboss-log4j.properties file.
What should I do? I don't want to copy these jar's to server lib or common directory.