aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/processing
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2018-09-14 14:33:49 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2018-09-14 14:33:49 +1200
commitb10824bb5769c4abb93e3451673b88efdfb9d467 (patch)
treec4d04ed2f19d5758a75b702467dbc051c5d0511c /src/org/traccar/processing
parente331573c0df7467fd36ae3eba3c259ed9b1d9253 (diff)
downloadtraccar-server-b10824bb5769c4abb93e3451673b88efdfb9d467.tar.gz
traccar-server-b10824bb5769c4abb93e3451673b88efdfb9d467.tar.bz2
traccar-server-b10824bb5769c4abb93e3451673b88efdfb9d467.zip
Log using slf4j and java logging
Diffstat (limited to 'src/org/traccar/processing')
-rw-r--r--src/org/traccar/processing/ComputedAttributesHandler.java11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/org/traccar/processing/ComputedAttributesHandler.java b/src/org/traccar/processing/ComputedAttributesHandler.java
index a4edcc460..d4090e709 100644
--- a/src/org/traccar/processing/ComputedAttributesHandler.java
+++ b/src/org/traccar/processing/ComputedAttributesHandler.java
@@ -29,9 +29,10 @@ import io.netty.channel.ChannelHandler;
import org.apache.commons.jexl2.JexlEngine;
import org.apache.commons.jexl2.JexlException;
import org.apache.commons.jexl2.MapContext;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.traccar.BaseDataHandler;
import org.traccar.Context;
-import org.traccar.helper.Log;
import org.traccar.model.Attribute;
import org.traccar.model.Device;
import org.traccar.model.Position;
@@ -39,6 +40,8 @@ import org.traccar.model.Position;
@ChannelHandler.Sharable
public class ComputedAttributesHandler extends BaseDataHandler {
+ private static final Logger LOGGER = LoggerFactory.getLogger(ComputedAttributesHandler.class);
+
private JexlEngine engine;
private boolean mapDeviceAttributes;
@@ -77,7 +80,7 @@ public class ComputedAttributesHandler extends BaseDataHandler {
}
}
} catch (IllegalAccessException | InvocationTargetException error) {
- Log.warning(error);
+ LOGGER.warn(null, error);
}
}
}
@@ -98,7 +101,7 @@ public class ComputedAttributesHandler extends BaseDataHandler {
try {
result = computeAttribute(attribute, position);
} catch (JexlException error) {
- Log.warning(error);
+ LOGGER.warn(null, error);
}
if (result != null) {
try {
@@ -115,7 +118,7 @@ public class ComputedAttributesHandler extends BaseDataHandler {
position.getAttributes().put(attribute.getAttribute(), result.toString());
}
} catch (ClassCastException error) {
- Log.warning(error);
+ LOGGER.warn(null, error);
}
}
}