aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/BaseProtocolDecoder.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-11-30 10:05:40 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2015-11-30 10:05:40 +1300
commitc6692703c8099577cb86c3eace5d8d1bc11f212d (patch)
tree913a240a76762d507b7e043348f267eae166ed7c /src/org/traccar/BaseProtocolDecoder.java
parenta017cdabef201be45e96379b58154163d68fc00f (diff)
downloadtrackermap-server-c6692703c8099577cb86c3eace5d8d1bc11f212d.tar.gz
trackermap-server-c6692703c8099577cb86c3eace5d8d1bc11f212d.tar.bz2
trackermap-server-c6692703c8099577cb86c3eace5d8d1bc11f212d.zip
Print remote address for unknown devices
Diffstat (limited to 'src/org/traccar/BaseProtocolDecoder.java')
-rw-r--r--src/org/traccar/BaseProtocolDecoder.java6
1 files changed, 5 insertions, 1 deletions
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;
}