-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi,
I would like to use log4j package instead of the java.util.logging to log my application on ZK also proprietary libraries.
I've set the file zk.xml
<?xml version="1.0" encoding="UTF-8"?> <zk> <device-config> <device-type>ajax</device-type> <timeout-uri>/timeout.zul</timeout-uri> <!-- An empty URL can cause the browser to reload the same URL --> </device-config> <!-- Hibernate SessionFactory life cycle --> <listener> <description>Hibernate SessionFactory life cycle</description> <listener-class>org.zkoss.zkplus.hibernate.HibernateSessionFactoryListener </listener-class> </listener> <!-- Hibernate OpenSessionInView life cycle --> <listener> <description>Hibernate Open Session In View life cycle</description> <listener-class>org.zkoss.zkplus.hibernate.OpenSessionInViewListener </listener-class> </listener> <preference> <name>HibernateUtil.config</name> <value>vis/om/hibernate/util/resources/hibernate.cfg.xml</value> </preference> <log> <log-base>org.zkoss</log-base> </log> <library-property> <name>org.zkoss.util.logging.config.file</name> <value>/vis/om/log/resources/log4j.properties</value> </library-property> </zk>
handlers = java.util.logging.ConsoleHandler java.util.logging.ConsoleHandler.level = FINER java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter #log4j.rootCategory=debug,stdout,R log4j.rootLogger=debug,stdout,R log4j.category.your.category.name=TRACE log4j.appender.stdout=org.apache.log4j.ConsoleAppender log4j.appender.stdout.layout=org.apache.log4j.PatternLayout log4j.appender.stdout.layout.ConversionPattern=%d [%t] %-5p %c - %m%n log4j.appender.R=org.apache.log4j.RollingFileAppender log4j.appender.R.File=C:/ordmngm.log log4j.appender.R.MaxFileSize=500KB fileslog4j.appender.R.MaxBackupIndex=1 log4j.appender.R.layout=org.apache.log4j.PatternLayout log4j.appender.R.layout.ConversionPattern=%d [%t] %-5p %c - %m%n #Make the log level of the specified package to DEBUG org.zkoss.zk.ui.http=DEBUG org.zkoss.zk.ui.impl.UiEngineImpl=FINER org.zkoss.bind=FINE
What you mean is you don't know why use this setting?
handlers = java.util.logging.ConsoleHandler
If true, sorry, it is not controlled by ZK, is controlled in Log4j.
Please read the Log4j manual for more detail information.
Hi,
i haven't found a solution.
Can i use log4j for logging the log messages of zk packages?
Or i have to use handlers = java.util.logging.ConsoleHandler for zk packages and log4j for my implementation?
Asked: 2012-06-20 10:29:54 +0800
Seen: 675 times
Last updated: Jul 27 '12
ZK studio and eclipse outline problem
ZK Package configuration problem
Eclipse Autocomplete not working in ZUL files...
Syntax Error mark ... help me!
Manual Installation of ZK Studio
Can't see button text whilst running simple demo
Adding Vbox to Center layout in Java