diff options
author | Anton Tananaev <anton@traccar.org> | 2024-04-08 07:39:40 -0700 |
---|---|---|
committer | Anton Tananaev <anton@traccar.org> | 2024-04-08 07:39:40 -0700 |
commit | b017ab22e2f612aa19d0bd62581b6e889a142dfa (patch) | |
tree | eb88fe0281955674b90863af4167011c4cd47cba /src/main/java/org/traccar/helper | |
parent | 569bb18dcd0d8bbde92b5efdbbb21bc02d6e90ae (diff) | |
download | trackermap-server-b017ab22e2f612aa19d0bd62581b6e889a142dfa.tar.gz trackermap-server-b017ab22e2f612aa19d0bd62581b6e889a142dfa.tar.bz2 trackermap-server-b017ab22e2f612aa19d0bd62581b6e889a142dfa.zip |
Add scheduled reports logging
Diffstat (limited to 'src/main/java/org/traccar/helper')
-rw-r--r-- | src/main/java/org/traccar/helper/LogAction.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/main/java/org/traccar/helper/LogAction.java b/src/main/java/org/traccar/helper/LogAction.java index b255b9206..efb02b340 100644 --- a/src/main/java/org/traccar/helper/LogAction.java +++ b/src/main/java/org/traccar/helper/LogAction.java @@ -50,7 +50,7 @@ public final class LogAction { private static final String PATTERN_LOGIN = "user: %d, action: %s, from: %s"; private static final String PATTERN_LOGIN_FAILED = "login failed from: %s"; private static final String PATTERN_DEVICE_ACCUMULATORS = "user: %d, action: %s, deviceId: %d"; - private static final String PATTERN_REPORT = "user: %d, report: %s, from: %s, to: %s, devices: %s, groups: %s"; + private static final String PATTERN_REPORT = "user: %d, %s: %s, from: %s, to: %s, devices: %s, groups: %s"; public static void create(long userId, BaseModel object) { logObjectAction(ACTION_CREATE, userId, object.getClass(), object.getId()); @@ -113,10 +113,11 @@ public final class LogAction { } public static void logReport( - long userId, String report, Date from, Date to, List<Long> deviceIds, List<Long> groupIds) { + long userId, boolean scheduled, String report, + Date from, Date to, List<Long> deviceIds, List<Long> groupIds) { DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm"); LOGGER.info(String.format( - PATTERN_REPORT, userId, report, + PATTERN_REPORT, userId, scheduled ? "scheduled" : "report", report, dateFormat.format(from), dateFormat.format(to), deviceIds.toString(), groupIds.toString())); } |