diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2014-10-18 20:49:12 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2014-10-18 20:49:12 +1300 |
commit | 13563221ad5aa99216a1e742c964fce49fed7187 (patch) | |
tree | 2e369e1bac0005ffc86428ad7bbebdf7fa9e80ec /src/org/traccar/helper | |
parent | bdd564d60fac0f55c528fd62a1d4f5fa36a07328 (diff) | |
download | traccar-server-13563221ad5aa99216a1e742c964fce49fed7187.tar.gz traccar-server-13563221ad5aa99216a1e742c964fce49fed7187.tar.bz2 traccar-server-13563221ad5aa99216a1e742c964fce49fed7187.zip |
Add default log appender (fix #931)
Diffstat (limited to 'src/org/traccar/helper')
-rw-r--r-- | src/org/traccar/helper/Log.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/org/traccar/helper/Log.java b/src/org/traccar/helper/Log.java index 7d8d24c21..648d4803f 100644 --- a/src/org/traccar/helper/Log.java +++ b/src/org/traccar/helper/Log.java @@ -28,6 +28,7 @@ import org.apache.log4j.Level; import org.apache.log4j.LogManager; import org.apache.log4j.Logger; import org.apache.log4j.PatternLayout; +import org.apache.log4j.varia.NullAppender; import org.jboss.netty.logging.AbstractInternalLogger; import org.jboss.netty.logging.InternalLogger; import org.jboss.netty.logging.InternalLoggerFactory; @@ -46,6 +47,8 @@ public class Log { layout, properties.getProperty("logger.file"), "'.'yyyyMMdd"); LogManager.resetConfiguration(); + LogManager.getRootLogger().addAppender(new NullAppender()); + logger = Logger.getLogger(LOGGER_NAME); logger.addAppender(appender); logger.setLevel(Level.toLevel(properties.getProperty("logger.level"), Level.ALL)); |