Log and LogFactory are not log4j classes (http://logging.apache.org/log4j/1.2/apidocs/index.html).
However they are both Commons Logging classes ( http://commons.apache.org/logging/commons-logging-1.1.1/apidocs/index.html ). Are you using Commons Logging on accident? Or are you trying to find out the differences between Commons Logging and Log4j? Take a look at http://commons.apache.org/logging/commons-logging-1.1.1/guide.html. -----Original Message----- From: SkyMe [mailto:[email protected]] Sent: Wednesday, September 30, 2009 8:03 AM To: [email protected] Subject: Diff between Logger and Log Hello! I faced with a such situation when Logger and Log act differently. I configure my log4j with DOMConfigurator.configureAndWatch(xmlFileName); 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().... or LogManager.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: [email protected] For additional commands, e-mail: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
