Hello,
My subject line is a summary of the issue, but in reality I think I know what happens --- I'm basically looking for confirmation.
Background:
We put a bunch of expensive operations in Logger.isDebugEnabled() if statements, and we had a customer complain about the performance. (The operations were in support of creating log messages.) We discovered that the customer was using a file called "log4j_properties", and therefore was essentially running under no configuration. The result is that debug *is* enabled, even though there are no appenders enabled. The customer is running log4j version 1.2.8.
Questions:
- Is this assessment correct? My understanding is the RootCategory is created with DEBUG as the level, and in the absence of a properties file (or XML file) any loggers created by name are put into the RootCategory, and therefore DEBUG is enabled.
- Is there a way to make my application "default" the log4j level to OFF instead of DEBUG, in the absence of a properties file?
- Is it feasible for log4j to pretend all of its logging is off whenever there exist no appenders? Or maybe it could default the RootCategory level to OFF instead of DEBUG?
- Is this symptom something that will be mitigated in the next major version of log4j? We will probably be shipping next with 1.2.9, which I believe has the same behavior, but I noticed that the CVS version has a lot changed.
Thank you, Kim Nico Vizdom, Inc. www.vizdom.com
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]