java - Change logging level in Tomcat at runtime? -


i using juli logging framework in current tomcat 7, providing webapp specific logging.properties in web-inf/classes folder.

now looking way change log level of logger at runtime.

i found several sources saying changing level of logger @ runtime might possible via mbean server. unfortunately appropriate mbean "java.util.logging.logging" not list webapp specific logger, cannot execute method "setloggerlevel".

does know how accomplish this? hints - excluding suggesting use log4j, is... ;-)

connecting jconsole tomcat , using mbean tab change logger level ideal way. 1 issue logger names don't exist unless code has triggered creation of logger. can't use mbean create logger ahead of code running. should use jconsole double check mbean doesn't exist.

tomcat installs custom logmanager filters current class loader. jmx using system class loader possible classloaderlogmanager won't return logger names because current classloader not web app classloader.

you create servlet/jsp form or webservice deployed application get logger , set level. might have pin each modified logger in memory keep logger level active. can free logger once level set null. you'll have deal security concerns including such page.

i wouldn't on production server can configure watchedresource in tomcat points logging.properties. time file updated web app redeployed new settings. watch out classloader leaks going route.


Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -