[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
Mon Jul 16 09:37:46 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/748240#748240

--------------------------------------------------------------
> rang s wrote:
> 
> Looks like either something is missing or I am doing it wrongly.
> 
> This is the scenario I am trying. I have a EJB jar file. It uses java util logging. Now I wish to use JUL-to-SLF4J stub and then wish to log the messages via log4j.
There's your first issue.  You do not need to use JUL-to-SLF4J in order to log JUL messages in AS 7.  Our stub version of this library actually does nothing and is only there to prevent errors in existing code.


> rang s wrote:
> 
> ( I have specified this handled in logging.properties bundled in ejb jar, hope this is the right way) .
> 
> I have tried adding log4j.properties in the ejb jar but the messages were not logged.
If you have both a logging.properties and a log4j.properties, I believe the log4j.properties will be ignored.  You can only have one logging configuration file per deployment, and that configuration applies to all logging APIs, including slf4j, JUL, log4j, etc.  AS automatically unifies all log frameworks.

> rang s wrote:
> 
> ( SLF4J says that an application needs to have slf4j-log4j12-1.6.6.jar and log4j. The former I bundle with my ejb jar. The latter is provided by JBoss AS7. Hope this is fine)
You do not need any slf4j JARs as AS7 already provides them all.  Any slf4j JAR you do provide should be ignored, though I'd leave them out just to be safe.
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/748240#748240]

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/20120716/044a0c70/attachment.html 


More information about the jboss-dev-forums mailing list