aboutsummaryrefslogtreecommitdiff
path: root/src/org
diff options
context:
space:
mode:
authorRenaud Allard <r@bilbo.eriador.org>2016-10-17 18:02:21 +0200
committerRenaud Allard <r@bilbo.eriador.org>2016-10-17 18:02:21 +0200
commitf12afeb19af4555ac7380e4c6159681e8bf13896 (patch)
treec4f9be36a40005f617a10a2c4a85c382b3067906 /src/org
parent7e2698ea6d1933030cd7e7a2fb33e3c984166f78 (diff)
downloadtrackermap-server-f12afeb19af4555ac7380e4c6159681e8bf13896.tar.gz
trackermap-server-f12afeb19af4555ac7380e4c6159681e8bf13896.tar.bz2
trackermap-server-f12afeb19af4555ac7380e4c6159681e8bf13896.zip
Log which filters have been used
Diffstat (limited to 'src/org')
-rw-r--r--src/org/traccar/FilterHandler.java26
1 files changed, 25 insertions, 1 deletions
diff --git a/src/org/traccar/FilterHandler.java b/src/org/traccar/FilterHandler.java
index 1ce9e2460..8acc06935 100644
--- a/src/org/traccar/FilterHandler.java
+++ b/src/org/traccar/FilterHandler.java
@@ -150,16 +150,40 @@ public class FilterHandler extends BaseDataHandler {
private boolean filter(Position p) {
+ String filterType = "";
+
boolean result = filterInvalid(p) || filterZero(p) || filterDuplicate(p)
|| filterFuture(p) || filterApproximate(p) || filterStatic(p)
|| filterDistance(p);
+ if (filterInvalid(p)) {
+ filterType = "Invalid ";
+ }
+ if (filterZero(p)) {
+ filterType = (filterType + "Zero ");
+ }
+ if (filterDuplicate(p)) {
+ filterType = (filterType + "Duplicate ");
+ }
+ if (filterFuture(p)) {
+ filterType = (filterType + "Future ");
+ }
+ if (filterApproximate(p)) {
+ filterType = (filterType + "Approximate ");
+ }
+ if (filterStatic(p)) {
+ filterType = (filterType + "Static ");
+ }
+ if (filterDistance(p)) {
+ filterType = (filterType + "Distance ");
+ }
+
if (filterLimit(p)) {
result = false;
}
if (result) {
- Log.info("Position filtered from " + p.getDeviceId());
+ Log.info("Position filtered by " + filterType + "filters from " + p.getDeviceId());
}
return result;