Reputation: 3683
I deploy my app in tomcat6.
One of the shared jars in my war file has a logging.properties that is overriding the logging provided by tomcat.
Is there any way to override a logging.properties file in a shared jar by a custom logging.properties file.?
UPDATE:
I see in the jvm start command line this statement
-Djava.util.logging.config.file=/usr/local/tomcat/conf/logging.properties
,
but it does not seem to be overriding the file included in the shared jar file.
Upvotes: 2
Views: 2779
Reputation: 11065
Per the Tomcat 6 logging documentation the logging is configured the following ways:
If the shared library is placing the logging.properties in WEB-INF/classes you'll have to remove it. If it is not placed there, then the shared library contains code that is calling LogManager.readConfiguration. If that is the case you should be able to call LogManager.getLogManager().reset()
after the shared library has been loaded. This will force the configuration back to defaults described in the Tomcat docs.
Upvotes: 4