aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/geocoder
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/geocoder
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/geocoder')
-rw-r--r--src/org/traccar/geocoder/JsonGeocoder.java9
1 files changed, 6 insertions, 3 deletions
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;