aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2018-10-16 13:53:58 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2018-10-16 13:53:58 +1300
commit4a49c75d675439605a3f8c3ac1719fa2c3b596b8 (patch)
treeeed4cced80f086e440df2ae80ee34f0bf041a6c5
parentcaa767f83b9d6107d0bd0c3e8af1dc6304f64daf (diff)
downloadtraccar-server-4a49c75d675439605a3f8c3ac1719fa2c3b596b8.tar.gz
traccar-server-4a49c75d675439605a3f8c3ac1719fa2c3b596b8.tar.bz2
traccar-server-4a49c75d675439605a3f8c3ac1719fa2c3b596b8.zip
Remove unnecessary methods
-rw-r--r--pom.xml5
-rw-r--r--src/org/traccar/BasePipelineFactory.java4
-rw-r--r--src/org/traccar/Context.java9
3 files changed, 7 insertions, 11 deletions
diff --git a/pom.xml b/pom.xml
index 4fda57182..da38a4c1e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -75,6 +75,11 @@
<version>4.2.1</version>
</dependency>
<dependency>
+ <groupId>com.google.inject.extensions</groupId>
+ <artifactId>guice-assistedinject</artifactId>
+ <version>4.2.1</version>
+ </dependency>
+ <dependency>
<groupId>org.glassfish</groupId>
<artifactId>javax.json</artifactId>
<version>1.1.2</version>
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<Channel> {
}
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);
}