|Summary:||Setting logger-specific overrides in logging.properties not working|
|Product:||Tomcat 7||Reporter:||Glen Mazza <gmazza>|
|Component:||Catalina||Assignee:||Tomcat Developers Mailing List <dev>|
Description Glen Mazza 2011-09-02 11:44:29 UTC
Logger-specific configuration is being ignored in the $CATALINA_HOME/conf/logging.properties file. Problem was asked (and unanswered) here, and googling did not turn up a solution either: http://old.nabble.com/Having-difficulty-suppressing-the-org.apache.tomcat.util.digester.Digester-logger-to32367312.html Steps to reproduce: 1.) Set the global logging level to FINE: .level = FINE 2.) Add a logger-specific logging level override: org.apache.tomcat.util.digester.Digester.level = INFO (or SEVERE) 3.) Start up Tomcat and view the catalina-(date).log file or catalina.out. You'll see the above logger outputting countless FINE messages -- its output is not being suppressed despite the statement in #2 above.
Comment 1 Mark Thomas 2011-09-02 15:01:00 UTC
The logger name is not the same as the class name in that one case. The work-around is to define the level for: org.apache.commons.digester.Digester.level = INFO
Comment 2 Mark Thomas 2011-09-02 15:04:45 UTC
This has been fixed in trunk and 7.0.x and will be included in 7.0.22 onwards.
Comment 3 Glen Mazza 2011-09-02 16:12:15 UTC
Thanks. I'll use the workaround but what is the fix in 7.0.22+ , did you rename the logger back to the actual class name (org.apache.commons.digester.Digester) or put in special coding for "org.apache.tomcat.util.digester.Digester" to be understood as org.apache.commons.digester.Digester? It's unfortunate this particular logger had the mismatch, as it's obviously an extremely chatty logger one would immediately like to suppress as one moves to FINE or more granular logging levels--many others presumably can get tripped up on this.
Comment 4 Mark Thomas 2011-09-02 16:21:39 UTC
The logger was named to align with the class.
Comment 5 Konstantin Kolinko 2011-09-09 23:34:16 UTC
Comment 6 Konstantin Kolinko 2011-09-09 23:39:48 UTC
Created attachment 27479 [details] 2011-09-10_tc6_bug51758.patch Patch for 6.0.x