aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/BasePipelineFactory.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2019-04-12 21:13:14 -0700
committerAnton Tananaev <anton.tananaev@gmail.com>2019-04-12 21:13:14 -0700
commitc850469c29465abb7ed446492d0bd2351b760203 (patch)
treeea162c755b7c0ef489263ff66c416417dba02287 /src/main/java/org/traccar/BasePipelineFactory.java
parent818fe3e3e85c2e19dfcd12770b7aaee5820c0099 (diff)
downloadtrackermap-server-c850469c29465abb7ed446492d0bd2351b760203.tar.gz
trackermap-server-c850469c29465abb7ed446492d0bd2351b760203.tar.bz2
trackermap-server-c850469c29465abb7ed446492d0bd2351b760203.zip
Log protocol name instead of port
Diffstat (limited to 'src/main/java/org/traccar/BasePipelineFactory.java')
-rw-r--r--src/main/java/org/traccar/BasePipelineFactory.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/BasePipelineFactory.java b/src/main/java/org/traccar/BasePipelineFactory.java
index b3d37f689..ac008cdd1 100644
--- a/src/main/java/org/traccar/BasePipelineFactory.java
+++ b/src/main/java/org/traccar/BasePipelineFactory.java
@@ -56,11 +56,13 @@ public abstract class BasePipelineFactory extends ChannelInitializer<Channel> {
private static final Logger LOGGER = LoggerFactory.getLogger(BasePipelineFactory.class);
private final TrackerServer server;
+ private final String protocol;
private boolean eventsEnabled;
private int timeout;
public BasePipelineFactory(TrackerServer server, String protocol) {
this.server = server;
+ this.protocol = protocol;
eventsEnabled = Context.getConfig().getBoolean(Keys.EVENT_ENABLE);
timeout = Context.getConfig().getInteger(Keys.PROTOCOL_TIMEOUT.withPrefix(protocol));
if (timeout == 0) {
@@ -103,7 +105,7 @@ public abstract class BasePipelineFactory extends ChannelInitializer<Channel> {
}
pipeline.addLast(new OpenChannelHandler(server));
pipeline.addLast(new NetworkMessageHandler());
- pipeline.addLast(new StandardLoggingHandler());
+ pipeline.addLast(new StandardLoggingHandler(protocol));
addProtocolHandlers(handler -> {
if (!(handler instanceof BaseProtocolDecoder || handler instanceof BaseProtocolEncoder)) {