diff options
Diffstat (limited to 'src/org/traccar/processing/ComputedAttributesHandler.java')
-rw-r--r-- | src/org/traccar/processing/ComputedAttributesHandler.java | 11 |
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); } } } |