aboutsummaryrefslogtreecommitdiff
path: root/src/org
diff options
context:
space:
mode:
authorRenaud Allard <renaud@allard.it>2016-10-17 18:14:34 +0200
committerRenaud Allard <renaud@allard.it>2016-10-17 18:14:34 +0200
commitd5c07a40ab27e3e4021f1c8a881b64cc9e43ff00 (patch)
treec4f9be36a40005f617a10a2c4a85c382b3067906 /src/org
parent7e2698ea6d1933030cd7e7a2fb33e3c984166f78 (diff)
downloadtraccar-server-d5c07a40ab27e3e4021f1c8a881b64cc9e43ff00.tar.gz
traccar-server-d5c07a40ab27e3e4021f1c8a881b64cc9e43ff00.tar.bz2
traccar-server-d5c07a40ab27e3e4021f1c8a881b64cc9e43ff00.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;