aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/Server.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/Server.java')
-rw-r--r--src/org/traccar/Server.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/org/traccar/Server.java b/src/org/traccar/Server.java
index 506513b60..2167a7933 100644
--- a/src/org/traccar/Server.java
+++ b/src/org/traccar/Server.java
@@ -28,8 +28,10 @@ import java.util.List;
import java.util.Properties;
import java.util.logging.FileHandler;
import java.util.logging.Formatter;
+import java.util.logging.Handler;
import java.util.logging.Level;
import java.util.logging.LogRecord;
+import java.util.logging.Logger;
import org.jboss.netty.bootstrap.ServerBootstrap;
import org.jboss.netty.buffer.ChannelBuffers;
import org.jboss.netty.channel.ChannelPipeline;
@@ -200,7 +202,12 @@ public class Server {
}
});
- // NOTE: Console logger level will remain INFO
+ // Remove old logging handlers
+ Handler[] handlers = Logger.getLogger("").getHandlers();
+ for(Handler handler : handlers) {
+ Logger.getLogger("").removeHandler(handler);
+ }
+
Log.getLogger().setLevel(Level.ALL);
Log.getLogger().addHandler(file);
}