aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/BasePipelineFactory.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2018-09-14 14:33:49 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2018-09-14 14:33:49 +1200
commitb10824bb5769c4abb93e3451673b88efdfb9d467 (patch)
treec4d04ed2f19d5758a75b702467dbc051c5d0511c /src/org/traccar/BasePipelineFactory.java
parente331573c0df7467fd36ae3eba3c259ed9b1d9253 (diff)
downloadtrackermap-server-b10824bb5769c4abb93e3451673b88efdfb9d467.tar.gz
trackermap-server-b10824bb5769c4abb93e3451673b88efdfb9d467.tar.bz2
trackermap-server-b10824bb5769c4abb93e3451673b88efdfb9d467.zip
Log using slf4j and java logging
Diffstat (limited to 'src/org/traccar/BasePipelineFactory.java')
-rw-r--r--src/org/traccar/BasePipelineFactory.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/org/traccar/BasePipelineFactory.java b/src/org/traccar/BasePipelineFactory.java
index 6269fb8cc..4cf5d7a98 100644
--- a/src/org/traccar/BasePipelineFactory.java
+++ b/src/org/traccar/BasePipelineFactory.java
@@ -29,6 +29,8 @@ import io.netty.channel.ChannelPromise;
import io.netty.channel.socket.DatagramChannel;
import io.netty.channel.socket.DatagramPacket;
import io.netty.handler.timeout.IdleStateHandler;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.traccar.events.CommandResultEventHandler;
import org.traccar.events.DriverEventHandler;
import org.traccar.events.FuelDropEventHandler;
@@ -38,7 +40,6 @@ import org.traccar.events.MaintenanceEventHandler;
import org.traccar.events.MotionEventHandler;
import org.traccar.events.OverspeedEventHandler;
import org.traccar.events.AlertEventHandler;
-import org.traccar.helper.Log;
import org.traccar.processing.ComputedAttributesHandler;
import org.traccar.processing.CopyAttributesHandler;
@@ -46,6 +47,8 @@ import java.net.InetSocketAddress;
public abstract class BasePipelineFactory extends ChannelInitializer<Channel> {
+ private static final Logger LOGGER = LoggerFactory.getLogger(BasePipelineFactory.class);
+
private final TrackerServer server;
private int timeout;
@@ -155,7 +158,7 @@ public abstract class BasePipelineFactory extends ChannelInitializer<Channel> {
message.append(" HEX: ");
message.append(ByteBufUtil.hexDump((ByteBuf) networkMessage.getMessage()));
- Log.debug(message.toString());
+ LOGGER.debug(message.toString());
}
}
@@ -352,7 +355,7 @@ public abstract class BasePipelineFactory extends ChannelInitializer<Channel> {
try {
pipeline.addLast("extraHandler." + i, (ChannelHandler) Class.forName(handlers[i]).newInstance());
} catch (ClassNotFoundException | InstantiationException | IllegalAccessException error) {
- Log.warning(error);
+ LOGGER.warn(null, error);
}
}
}