diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2013-08-02 19:11:45 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2013-08-02 19:11:45 +1200 |
commit | ee14c8ee6e5fe0e5ede618cf954841a131882196 (patch) | |
tree | f138dd5efbb4fb89b73bb69027241152e4245f79 /src/org/traccar/helper | |
parent | 08eead58823782394f6219561e8f8251cdf17a48 (diff) | |
download | traccar-server-ee14c8ee6e5fe0e5ede618cf954841a131882196.tar.gz traccar-server-ee14c8ee6e5fe0e5ede618cf954841a131882196.tar.bz2 traccar-server-ee14c8ee6e5fe0e5ede618cf954841a131882196.zip |
Fix logging
Diffstat (limited to 'src/org/traccar/helper')
-rw-r--r-- | src/org/traccar/helper/Log.java | 6 |
1 files changed, 4 insertions, 2 deletions
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; |