From b10824bb5769c4abb93e3451673b88efdfb9d467 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Fri, 14 Sep 2018 14:33:49 +1200 Subject: Log using slf4j and java logging --- src/org/traccar/processing/ComputedAttributesHandler.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/org/traccar/processing') 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); } } } -- cgit v1.2.3