aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/database/QueryBuilder.java
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/database/QueryBuilder.java
parente331573c0df7467fd36ae3eba3c259ed9b1d9253 (diff)
downloadtrackermap-server-b10824bb5769c4abb93e3451673b88efdfb9d467.tar.gz
trackermap-server-b10824bb5769c4abb93e3451673b88efdfb9d467.tar.bz2
trackermap-server-b10824bb5769c4abb93e3451673b88efdfb9d467.zip
Log using slf4j and java logging
Diffstat (limited to 'src/org/traccar/database/QueryBuilder.java')
-rw-r--r--src/org/traccar/database/QueryBuilder.java23
1 files changed, 13 insertions, 10 deletions
diff --git a/src/org/traccar/database/QueryBuilder.java b/src/org/traccar/database/QueryBuilder.java
index af33458a8..8075223f2 100644
--- a/src/org/traccar/database/QueryBuilder.java
+++ b/src/org/traccar/database/QueryBuilder.java
@@ -16,8 +16,9 @@
package org.traccar.database;
import com.fasterxml.jackson.core.JsonProcessingException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.traccar.Context;
-import org.traccar.helper.Log;
import org.traccar.model.MiscFormatter;
import org.traccar.model.Permission;
@@ -43,6 +44,8 @@ import java.util.Map;
public final class QueryBuilder {
+ private static final Logger LOGGER = LoggerFactory.getLogger(QueryBuilder.class);
+
private final Map<String, List<Integer>> indexMap = new HashMap<>();
private Connection connection;
private PreparedStatement statement;
@@ -289,7 +292,7 @@ public final class QueryBuilder {
}
}
} catch (IllegalAccessException | InvocationTargetException | JsonProcessingException error) {
- Log.warning(error);
+ LOGGER.warn(null, error);
}
}
}
@@ -321,7 +324,7 @@ public final class QueryBuilder {
try {
method.invoke(object, resultSet.getBoolean(name));
} catch (IllegalAccessException | InvocationTargetException error) {
- Log.warning(error);
+ LOGGER.warn(null, error);
}
}
});
@@ -332,7 +335,7 @@ public final class QueryBuilder {
try {
method.invoke(object, resultSet.getInt(name));
} catch (IllegalAccessException | InvocationTargetException error) {
- Log.warning(error);
+ LOGGER.warn(null, error);
}
}
});
@@ -343,7 +346,7 @@ public final class QueryBuilder {
try {
method.invoke(object, resultSet.getLong(name));
} catch (IllegalAccessException | InvocationTargetException error) {
- Log.warning(error);
+ LOGGER.warn(null, error);
}
}
});
@@ -354,7 +357,7 @@ public final class QueryBuilder {
try {
method.invoke(object, resultSet.getDouble(name));
} catch (IllegalAccessException | InvocationTargetException error) {
- Log.warning(error);
+ LOGGER.warn(null, error);
}
}
});
@@ -365,7 +368,7 @@ public final class QueryBuilder {
try {
method.invoke(object, resultSet.getString(name));
} catch (IllegalAccessException | InvocationTargetException error) {
- Log.warning(error);
+ LOGGER.warn(null, error);
}
}
});
@@ -379,7 +382,7 @@ public final class QueryBuilder {
method.invoke(object, new Date(timestamp.getTime()));
}
} catch (IllegalAccessException | InvocationTargetException error) {
- Log.warning(error);
+ LOGGER.warn(null, error);
}
}
});
@@ -390,7 +393,7 @@ public final class QueryBuilder {
try {
method.invoke(object, resultSet.getBytes(name));
} catch (IllegalAccessException | InvocationTargetException error) {
- Log.warning(error);
+ LOGGER.warn(null, error);
}
}
});
@@ -403,7 +406,7 @@ public final class QueryBuilder {
try {
method.invoke(object, Context.getObjectMapper().readValue(value, parameterType));
} catch (InvocationTargetException | IllegalAccessException | IOException error) {
- Log.warning(error);
+ LOGGER.warn(null, error);
}
}
}