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/geocoder/JsonGeocoder.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/org/traccar/geocoder') diff --git a/src/org/traccar/geocoder/JsonGeocoder.java b/src/org/traccar/geocoder/JsonGeocoder.java index 36a3acb76..c0c789a51 100644 --- a/src/org/traccar/geocoder/JsonGeocoder.java +++ b/src/org/traccar/geocoder/JsonGeocoder.java @@ -15,8 +15,9 @@ */ package org.traccar.geocoder; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.traccar.Context; -import org.traccar.helper.Log; import javax.json.JsonObject; import javax.ws.rs.ClientErrorException; @@ -29,6 +30,8 @@ import java.util.Map; public abstract class JsonGeocoder implements Geocoder { + private static final Logger LOGGER = LoggerFactory.getLogger(JsonGeocoder.class); + private final String url; private final AddressFormat addressFormat; @@ -64,7 +67,7 @@ public abstract class JsonGeocoder implements Geocoder { if (callback != null) { callback.onFailure(new GeocoderException("Empty address")); } else { - Log.warning("Empty address"); + LOGGER.warn("Empty address"); } } return null; @@ -102,7 +105,7 @@ public abstract class JsonGeocoder implements Geocoder { try { return handleResponse(latitude, longitude, request.get(JsonObject.class), null); } catch (ClientErrorException e) { - Log.warning(e); + LOGGER.warn(null, e); } } return null; -- cgit v1.2.3