From ee14c8ee6e5fe0e5ede618cf954841a131882196 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Fri, 2 Aug 2013 19:11:45 +1200 Subject: Fix logging --- src/org/traccar/helper/Log.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/org/traccar/helper') diff --git a/src/org/traccar/helper/Log.java b/src/org/traccar/helper/Log.java index 4cd61b933..f79fce79d 100644 --- a/src/org/traccar/helper/Log.java +++ b/src/org/traccar/helper/Log.java @@ -27,6 +27,8 @@ import org.apache.log4j.PatternLayout; public class Log { + private static final String LOGGER_NAME = "traccar"; + private static Logger logger = null; public static void setupLogger(Properties properties) throws IOException { @@ -39,7 +41,7 @@ public class Log { layout, properties.getProperty("logger.file"), "'.'yyyyMMdd"); LogManager.resetConfiguration(); - logger = Logger.getRootLogger(); + logger = Logger.getLogger(LOGGER_NAME); logger.addAppender(appender); logger.setLevel(Level.DEBUG); } @@ -47,7 +49,7 @@ public class Log { public static Logger getLogger() { if (logger == null) { - logger = Logger.getRootLogger(); + logger = Logger.getLogger(LOGGER_NAME); logger.setLevel(Level.OFF); } return logger; -- cgit v1.2.3