[jboss-dev-forums] [JBoss AS 7 Development] - Re: AS7 Logging - org.jboss.logging.jul-to-slf4j-stub ?
David Lloyd
do-not-reply at jboss.com
Sun Jul 15 21:30:15 EDT 2012
David Lloyd [https://community.jboss.org/people/dmlloyd] created the discussion
"Re: AS7 Logging - org.jboss.logging.jul-to-slf4j-stub ?"
To view the discussion, visit: https://community.jboss.org/message/748162#748162
--------------------------------------------------------------
> rang s wrote:
>
> Thanks David for the reply.
>
> 1.) You mentioned that to avoid the JUL-to-SLF4J artificat of SLF4J, a no-op stub is added. How do I specify the underneath implementaion. For example- if I intend to use log4j, do I just need to package the log4j.jar and the config file in my jar file ?
If you want your application to have separate logging, you only need to include your log4j.xml, log4j.properties, or logging.properties file and that's it. Then your application's logging will be configured according to that file. The logging is always treated the same regardless of whether you use slf4j, JUL, log4j, or commons-logging; this means you could use a log4j.xml and use the JUL API if you wanted to, and it'd work correctly.
If you want your application to use container logging, just leave out any logging config file.
Either way, any logging JARs you include in your deployment should be automatically ignored by the container unless you specifically override it using jboss-deployment-structure.xml, which you normally should not do.
> rang s wrote:
>
> 2.) Also. as per https://docs.jboss.org/author/display/AS7/Implicit+module+dependencies+for+deployments https://docs.jboss.org/author/display/AS7/Implicit+module+dependencies+for+deployments , org.jboss.logging.jul-to-slf4j-stub is a implicit module. This does not seem to be the case. I had to explicitly had a dependency to avoid ClassNotFound Errors in 7.1.2.FINAL.
OK, that sounds like a bug to me. Could you please log an issue at https://issues.jboss.org/browse/AS7 https://issues.jboss.org/browse/AS7? Thanks.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/748162#748162]
Start a new discussion in JBoss AS 7 Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2225]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-dev-forums/attachments/20120715/c02c63dd/attachment.html
More information about the jboss-dev-forums
mailing list