From c6692703c8099577cb86c3eace5d8d1bc11f212d Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Mon, 30 Nov 2015 10:05:40 +1300 Subject: Print remote address for unknown devices --- src/org/traccar/BaseProtocolDecoder.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/org/traccar/BaseProtocolDecoder.java b/src/org/traccar/BaseProtocolDecoder.java index 2cfe285a7..3bd39d594 100644 --- a/src/org/traccar/BaseProtocolDecoder.java +++ b/src/org/traccar/BaseProtocolDecoder.java @@ -52,7 +52,11 @@ public abstract class BaseProtocolDecoder extends ExtendedObjectDecoder { } else { deviceId = 0; if (logWarning) { - Log.warning("Unknown device - " + uniqueId); + String message = "Unknown device - " + uniqueId; + if (remoteAddress != null) { + message += " (" + ((InetSocketAddress) remoteAddress).getHostString() + ")"; + } + Log.warning(message); } return false; } -- cgit v1.2.3