updated logging

Former-commit-id: b1bec201615fac36b7aa553fe806bc68535ac0ed
This commit is contained in:
Ziver Koc 2016-02-03 17:10:20 +01:00
parent 5fdb307f85
commit 946511aaab
2 changed files with 20 additions and 3 deletions

15
logging.properties Executable file
View file

@ -0,0 +1,15 @@
# logging.properties
# LogUtil.readConfiguration("logging.properties");
handlers = java.util.logging.ConsoleHandler, java.util.logging.FileHandler
java.util.logging.ConsoleHandler.level = ALL
java.util.logging.ConsoleHandler.formatter = zutil.log.CompactLogFormatter
java.util.logging.FileHandler.level = ALL
java.util.logging.FileHandler.formatter = zutil.log.CompactLogFormatter
se.hal.level = ALL
zutil.level = ALL
zutil.db.bean.level = INFO
zutil.net.http.pages.level = INFO

View file

@ -34,13 +34,15 @@ public class HalServer {
public static void main(String[] args) throws Exception { public static void main(String[] args) throws Exception {
// init logging // init logging
CompactLogFormatter formatter = new CompactLogFormatter(); LogUtil.readConfiguration("logging.properties");
/*CompactLogFormatter formatter = new CompactLogFormatter();
LogUtil.setLevel("se.hal", Level.FINEST); LogUtil.setLevel("se.hal", Level.FINEST);
LogUtil.setFormatter("se.hal", formatter); LogUtil.setFormatter("se.hal", formatter);
LogUtil.setLevel("zutil", Level.FINEST);
LogUtil.setLevel("zutil.db.bean", Level.INFO); LogUtil.setLevel("zutil.db.bean", Level.INFO);
LogUtil.setLevel("zutil.net.http.pages", Level.INFO);
LogUtil.setLevel("zutil", Level.FINEST);
LogUtil.setFormatter("zutil", formatter); LogUtil.setFormatter("zutil", formatter);
LogUtil.setGlobalFormatter(formatter); LogUtil.setGlobalFormatter(formatter);*/
// init Managers // init Managers
HalContext.initialize(); HalContext.initialize();