-
New Feature
-
Resolution: Done
-
Normal
-
None
-
None
-
None
Example,
<library-property> <name>org.zkoss.util.logging.config.file</name> <value>conf/zk-log.properties</value> </library-property>
Like java.util.logging.LogManager, you can specify the handler in the configuration file. For servers that doesn't turn on Java Logger, you have to specify the handler here. For example, Jetty doesn't turn on by default, so you could put the following content:
handlers = java.util.logging.ConsoleHandler java.util.logging.ConsoleHandler.level = FINER java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter org.zkoss.bind=FINE
Or you'd like to log to both console and a file.
handlers = java.util.logging.FileHandler, java.util.logging.ConsoleHandler
java.util.logging.ConsoleHandler.level = FINER
java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
java.util.logging.FileHandler.formatter = java.util.logging.SimpleFormatter
java.util.logging.FileHandler.pattern = /var/log/jetty6/solr-%u.log
java.util.logging.FileHandler.level = FINER
org.zkoss.bind=FINE
If Java Logger is default ON (such as Tomcat), you don't need to specify the handler:
org.zkoss.bind=FINE