From 4a49c75d675439605a3f8c3ac1719fa2c3b596b8 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Tue, 16 Oct 2018 13:53:58 +1300 Subject: Remove unnecessary methods --- src/org/traccar/BasePipelineFactory.java | 4 +--- src/org/traccar/Context.java | 9 +-------- 2 files changed, 2 insertions(+), 11 deletions(-) (limited to 'src/org/traccar') diff --git a/src/org/traccar/BasePipelineFactory.java b/src/org/traccar/BasePipelineFactory.java index ec935f5c9..aa02fb817 100644 --- a/src/org/traccar/BasePipelineFactory.java +++ b/src/org/traccar/BasePipelineFactory.java @@ -249,9 +249,7 @@ public abstract class BasePipelineFactory extends ChannelInitializer { } pipeline.addLast(new OpenChannelHandler(server)); pipeline.addLast(new NetworkMessageHandler()); - if (Context.isLoggerEnabled()) { - pipeline.addLast(new StandardLoggingHandler()); - } + pipeline.addLast(new StandardLoggingHandler()); addProtocolHandlers(new PipelineBuilder() { @Override diff --git a/src/org/traccar/Context.java b/src/org/traccar/Context.java index d652c7cbd..287e5c753 100644 --- a/src/org/traccar/Context.java +++ b/src/org/traccar/Context.java @@ -111,12 +111,6 @@ public final class Context { return config; } - private static boolean loggerEnabled; - - public static boolean isLoggerEnabled() { - return loggerEnabled; - } - private static ObjectMapper objectMapper; public static ObjectMapper getObjectMapper() { @@ -367,8 +361,7 @@ public final class Context { config = new Config(); config.load(configFile); - loggerEnabled = config.getBoolean("logger.enable"); - if (loggerEnabled) { + if (config.getBoolean("logger.enable")) { Log.setupLogger(config); } -- cgit v1.2.3