aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2023-12-10 14:12:41 -0800
committerAnton Tananaev <anton@traccar.org>2023-12-10 14:12:41 -0800
commit19e99aa97d3088055b534d06527c1f0fe7c8e094 (patch)
tree99974b014f5ee49d706f74fbfb4ab7a77effb3f0 /src/main/java/org
parent87b2f36a487edc54cf4d8a1e27ce338f67bf8d55 (diff)
downloadtrackermap-server-19e99aa97d3088055b534d06527c1f0fe7c8e094.tar.gz
trackermap-server-19e99aa97d3088055b534d06527c1f0fe7c8e094.tar.bz2
trackermap-server-19e99aa97d3088055b534d06527c1f0fe7c8e094.zip
Add events to the log
Diffstat (limited to 'src/main/java/org')
-rw-r--r--src/main/java/org/traccar/database/NotificationManager.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/main/java/org/traccar/database/NotificationManager.java b/src/main/java/org/traccar/database/NotificationManager.java
index 03cfba418..79585d67a 100644
--- a/src/main/java/org/traccar/database/NotificationManager.java
+++ b/src/main/java/org/traccar/database/NotificationManager.java
@@ -23,6 +23,7 @@ import org.traccar.config.Keys;
import org.traccar.forward.EventData;
import org.traccar.forward.EventForwarder;
import org.traccar.geocoder.Geocoder;
+import org.traccar.helper.DateUtil;
import org.traccar.model.Calendar;
import org.traccar.model.Device;
import org.traccar.model.Event;
@@ -107,6 +108,14 @@ public class NotificationManager {
})
.collect(Collectors.toUnmodifiableList());
+ Device device = cacheManager.getObject(Device.class, event.getDeviceId());
+ LOGGER.info(
+ "Event id: {}, time: {}, type: {}, notifications: {}",
+ device.getUniqueId(),
+ DateUtil.formatDate(event.getEventTime(), false),
+ event.getType(),
+ notifications.size());
+
if (!notifications.isEmpty()) {
if (position != null && position.getAddress() == null && geocodeOnRequest && geocoder != null) {
position.setAddress(geocoder.getAddress(position.getLatitude(), position.getLongitude(), null));