aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/helper/Log.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2018-06-02 22:12:44 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2018-06-02 22:12:44 +1200
commit06e3bd8b16da12baafc9a97ba5949b3f7ffb5e07 (patch)
tree8f5d7b71ca3fa39448e93b3d0652a7fa8d496932 /src/org/traccar/helper/Log.java
parent5a9811c3771d92832c9bba718b5ec935844978e8 (diff)
downloadtrackermap-server-06e3bd8b16da12baafc9a97ba5949b3f7ffb5e07.tar.gz
trackermap-server-06e3bd8b16da12baafc9a97ba5949b3f7ffb5e07.tar.bz2
trackermap-server-06e3bd8b16da12baafc9a97ba5949b3f7ffb5e07.zip
Start Netty 4 migration
Diffstat (limited to 'src/org/traccar/helper/Log.java')
-rw-r--r--src/org/traccar/helper/Log.java78
1 files changed, 1 insertions, 77 deletions
diff --git a/src/org/traccar/helper/Log.java b/src/org/traccar/helper/Log.java
index d74246a64..a22e4bde2 100644
--- a/src/org/traccar/helper/Log.java
+++ b/src/org/traccar/helper/Log.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2012 - 2016 Anton Tananaev (anton@traccar.org)
+ * Copyright 2012 - 2018 Anton Tananaev (anton@traccar.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -23,9 +23,6 @@ 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;
import org.traccar.Config;
import java.io.IOException;
@@ -67,14 +64,6 @@ public final class Log {
logger.addAppender(appender);
logger.setLevel(Level.toLevel(config.getString("logger.level"), Level.ALL));
- // Workaround for "Bug 745866 - (EDG-45) Possible netty logging config problem"
- InternalLoggerFactory.setDefaultFactory(new InternalLoggerFactory() {
- @Override
- public InternalLogger newInstance(String string) {
- return new NettyInternalLogger();
- }
- });
-
Log.logSystemInfo();
Log.info("Version: " + getAppVersion());
}
@@ -200,69 +189,4 @@ public final class Log {
return s.toString();
}
- /**
- * Netty logger implementation
- */
- private static class NettyInternalLogger extends AbstractInternalLogger {
-
- @Override
- public boolean isDebugEnabled() {
- return false;
- }
-
- @Override
- public boolean isInfoEnabled() {
- return false;
- }
-
- @Override
- public boolean isWarnEnabled() {
- return true;
- }
-
- @Override
- public boolean isErrorEnabled() {
- return true;
- }
-
- @Override
- public void debug(String string) {
- debug(string, null);
- }
-
- @Override
- public void debug(String string, Throwable thrwbl) {
- }
-
- @Override
- public void info(String string) {
- info(string, null);
- }
-
- @Override
- public void info(String string, Throwable thrwbl) {
- }
-
- @Override
- public void warn(String string) {
- warn(string, null);
- }
-
- @Override
- public void warn(String string, Throwable thrwbl) {
- getLogger().warn("netty warning: " + string);
- }
-
- @Override
- public void error(String string) {
- error(string, null);
- }
-
- @Override
- public void error(String string, Throwable thrwbl) {
- getLogger().error("netty error: " + string);
- }
-
- }
-
}