yes, I know, there is the FAQ and this is a minor thing... but anyway, it would be great that when hitting <<log4j:WARN No appenders could be found for logger (com.mydomain.test.app.myTest). log4j:WARN Please initialize the log4j system properly.>> To save people a lot of time to figure out to solve this, I suggest: 1) to quote the above URL in that error message 2) to tell the user where you really were looking - absolute path (yes, I know that class-loading thing is the fault of the Java Guys or those who decided that different platform have different path names...) 3) in the FAQ, point to configuration section of http://logging.apache.org/log4j/docs/manual.html or even cite some code snippets like PropertyConfigurator.configure(args[0]); or PropertyConfigurator.configure("log4j.properties"); //relative to //"classpath-root"
I agree, the message should be improved. However, the most frequent annoyment with log4j I have met is the NEED to have log4j.properties/.xml files and those that linger around when they should have been deleted. I suggest that the default behaviour in THIS situation is to log a more descriptive message and call BasicConfigurator.configure() to get a plain console appender running.
Disabling logging when no configuration could be found was a explicit design issue since certain environments (such as Webapps) logging to the console is undesirable. JDK 1.4 logging has a fallback configuration file that is provided with the JDK, so it never runs into the lack of configuration problem. log4j 2.0 could possibly delegate to JDK 1.4 logging if no other configuration was found. Added issue LOG4J2-23 for that. Added a message pointing to the FAQ, but there is not much that we can easily do to display the class loader's strategy for locating resources. Committed rev 685228.