Summary: | more explanations when hitting "WARN No appenders could be found for logger" | ||
---|---|---|---|
Product: | Log4j - Now in Jira | Reporter: | Ralf Hauser <hauser> |
Component: | Configurator | Assignee: | log4j-dev <log4j-dev> |
Status: | RESOLVED FIXED | ||
Severity: | enhancement | ||
Priority: | P3 | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Hardware: | Other | ||
OS: | other | ||
URL: | http://logging.apache.org/log4j/docs/FAQ.html#j2ee |
Description
Ralf Hauser
2003-12-24 15:09:19 UTC
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. |