DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=39627>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ· INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=39627 Summary: JULI ignores a ".level = XXX" directive in logging.properties Product: Tomcat 5 Version: 5.5.17 Platform: PC OS/Version: Linux Status: NEW Severity: minor Priority: P3 Component: Catalina AssignedTo: tomcat-dev@jakarta.apache.org ReportedBy: [EMAIL PROTECTED] When using the standard Java Logging API (e.g. in a standalone Java program, outside of Tomcat), the logging.properties file can have a directive such as .level = FINE which will set the threshold for the root logger. Assuming in this case that the handlers associated with the root logger also have a threshold of FINE (or lower), then FINE log messages passed to the root logger will be output by the handlers (e.g. to the console, or to a file). When using JULI, the ".level = XXX" directive is ignored. The default logging configuration for Tomcat sets the threshold for the root logger's handlers (1catalina.org.apache.juli.FileHandler and java.util.logging.ConsoleHandler) to FINE, so putting ".level = ALL" should be enough to get all FINE (and CONFIG) log messages sent to the console and log files. It doesn't work if JULI is used directly: Logger log = Logger.getLogger("name"); log.fine("Some message"); It also doesn't work if Commons Logging is used (since the Jdk14Logger just delegates the logging to a Java Logging Logger object - Commong Logging "debug" is translated into Java Logging "FINE"): Log log = LogFactory.get("name"); log.debug("Some message"); The workaround for this is to explicitly give a threshold for a lower-level (package-level, for example) logger, and explicitly list the default handlers for this logger. For example: my.logger.level = FINE my.logger.handlers = 1catalina.org.apache.juli.FileHandler, java.util.logging.ConsoleHandler -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]