logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From SkyMe <gs_v...@mail.ru>
Subject Diff between Logger and Log
Date Wed, 30 Sep 2009 12:02:48 GMT

Hello! I faced with a such situation when Logger and Log act differently.
I configure my log4j with


In the configure xml file there is defined only one appender - FileAppender.
So, when I'm using

Log log = LogFactory.getLog(name);

and then

log.info("I'm a log!");

it writes this log to file.

But when I'm using

Logger logger.getLogger()....

they write logs only to the console! Why don't they use configurations from
xml file?

context: I deploy my app to JBoss AS, I use my owm log4j.xml (not JBoss'
one), I added log4j.jar to the lib of my .ear project.

Thank you!
View this message in context: http://www.nabble.com/Diff-between-Logger-and-Log-tp25679656p25679656.html
Sent from the Log4j - Users mailing list archive at Nabble.com.

To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org

View raw message