aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/org/traccar/MainEventHandler.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/org/traccar/MainEventHandler.java b/src/org/traccar/MainEventHandler.java
index f99765de4..1be20c291 100644
--- a/src/org/traccar/MainEventHandler.java
+++ b/src/org/traccar/MainEventHandler.java
@@ -36,10 +36,12 @@ public class MainEventHandler extends IdleStateAwareChannelHandler {
Position position = (Position) e.getMessage();
+ String uniqueId = Context.getDataManager().getDeviceById(position.getDeviceId()).getUniqueId();
+
// Log position
StringBuilder s = new StringBuilder();
s.append(formatChannel(e.getChannel())).append(" ");
- s.append("id: ").append(position.getDeviceId()).append(", ");
+ s.append("id: ").append(uniqueId).append(", ");
s.append("time: ").append(
new SimpleDateFormat(Log.DATE_FORMAT).format(position.getFixTime())).append(", ");
s.append("lat: ").append(String.format("%.5f", position.getLatitude())).append(", ");