1.1 --- a/org/sonews/util/Log.java Thu Aug 20 18:41:21 2009 +0200
1.2 +++ b/org/sonews/util/Log.java Fri Aug 21 17:33:15 2009 +0200
1.3 @@ -39,8 +39,10 @@
1.4 {
1.5 Logger mainLogger = Logger.getLogger(MAIN);
1.6 StreamHandler handler = new StreamHandler(System.out, new SimpleFormatter());
1.7 - handler.setLevel(Level.parse(Config.inst().get(Config.LOGLEVEL, "INFO")));
1.8 + Level level = Level.parse(Config.inst().get(Config.LOGLEVEL, "INFO"));
1.9 + handler.setLevel(level);
1.10 mainLogger.addHandler(handler);
1.11 + mainLogger.setLevel(level);
1.12 LogManager.getLogManager().addLogger(mainLogger);
1.13 }
1.14
1.15 @@ -51,7 +53,10 @@
1.16
1.17 public static Logger get(String name)
1.18 {
1.19 - return LogManager.getLogManager().getLogger(name);
1.20 + Level level = Level.parse(Config.inst().get(Config.LOGLEVEL, "INFO"));
1.21 + Logger logger = LogManager.getLogManager().getLogger(name);
1.22 + logger.setLevel(level);
1.23 + return logger;
1.24 }
1.25
1.26 }