aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/org/traccar/helper/Log.java6
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;