[jboss-dev-forums] [JBoss AS 7 Development] - Re: AS7 Logging - org.jboss.logging.jul-to-slf4j-stub ?
Patrick Ruckstuhl
do-not-reply at jboss.com
Thu Jul 26 11:20:01 EDT 2012
Patrick Ruckstuhl [https://community.jboss.org/people/tarioch] created the discussion
"Re: AS7 Logging - org.jboss.logging.jul-to-slf4j-stub ?"
To view the discussion, visit: https://community.jboss.org/message/750506#750506
--------------------------------------------------------------
> > 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.
This doesn't seem to work for me.
If I create the file
my.ear/META-INF/log4j.properties
with
log4j.rootLogger=DEBUG, FA
log4j.appender.FA=org.apache.log4j.FileAppender
log4j.appender.FA.File=/tmp/my.log
log4j.appender.FA.layout=org.apache.log4j.PatternLayout
log4j.appender.FA.layout.ConversionPattern= %-4r [%t] %-5p %c %x - %m%n
this results in nothing in the server.log and an empty /tmp/my.log
but if I create a
my.ear/META-INF/logging.properties
this results in everything beeing logged to /tmp/my.log
We're using SLF4J in our application and also using a library that uses COMMONS-LOGGING
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/750506#750506]
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/20120726/272e52dd/attachment.html
More information about the jboss-dev-forums
mailing list