aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2018-09-15 18:16:21 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2018-09-15 18:16:21 +1200
commitfc1ef8342339e72e5d4a88ac953dfaafc3cc3b63 (patch)
tree76aa5439b98e5e182164e0baf3b64add81af187e /src/org/traccar
parentdc3559a9cc49206e87f26349b8f8a41398f299b5 (diff)
downloadtrackermap-server-fc1ef8342339e72e5d4a88ac953dfaafc3cc3b63.tar.gz
trackermap-server-fc1ef8342339e72e5d4a88ac953dfaafc3cc3b63.tar.bz2
trackermap-server-fc1ef8342339e72e5d4a88ac953dfaafc3cc3b63.zip
Fix logging level issues
Diffstat (limited to 'src/org/traccar')
-rw-r--r--src/org/traccar/BasePipelineFactory.java2
-rw-r--r--src/org/traccar/database/DataManager.java2
-rw-r--r--src/org/traccar/helper/Log.java5
-rw-r--r--src/org/traccar/smpp/ClientSmppSessionHandler.java2
-rw-r--r--src/org/traccar/smpp/SmppClient.java4
5 files changed, 9 insertions, 6 deletions
diff --git a/src/org/traccar/BasePipelineFactory.java b/src/org/traccar/BasePipelineFactory.java
index b4027fa38..5bf84d4f6 100644
--- a/src/org/traccar/BasePipelineFactory.java
+++ b/src/org/traccar/BasePipelineFactory.java
@@ -158,7 +158,7 @@ public abstract class BasePipelineFactory extends ChannelInitializer<Channel> {
message.append(" HEX: ");
message.append(ByteBufUtil.hexDump((ByteBuf) networkMessage.getMessage()));
- LOGGER.debug(message.toString());
+ LOGGER.info(message.toString());
}
}
diff --git a/src/org/traccar/database/DataManager.java b/src/org/traccar/database/DataManager.java
index 71db329bc..f28041fc3 100644
--- a/src/org/traccar/database/DataManager.java
+++ b/src/org/traccar/database/DataManager.java
@@ -361,7 +361,7 @@ public class DataManager {
long historyDays = config.getInteger("database.historyDays");
if (historyDays != 0) {
Date timeLimit = new Date(System.currentTimeMillis() - historyDays * 24 * 3600 * 1000);
- LOGGER.debug(
+ LOGGER.info(
"Clearing history earlier than " + new SimpleDateFormat(Context.DATE_FORMAT).format(timeLimit));
QueryBuilder.create(dataSource, getQuery("database.deletePositions"))
.setDate("serverTime", timeLimit)
diff --git a/src/org/traccar/helper/Log.java b/src/org/traccar/helper/Log.java
index d606c7355..890026b0c 100644
--- a/src/org/traccar/helper/Log.java
+++ b/src/org/traccar/helper/Log.java
@@ -159,7 +159,10 @@ public final class Log {
}
handler.setFormatter(new LogFormatter(config.getBoolean("logger.fullStackTraces")));
- handler.setLevel(Level.parse(config.getString("logger.level").toUpperCase()));
+
+ Level level = Level.parse(config.getString("logger.level").toUpperCase());
+ rootLogger.setLevel(level);
+ handler.setLevel(level);
rootLogger.addHandler(handler);
}
diff --git a/src/org/traccar/smpp/ClientSmppSessionHandler.java b/src/org/traccar/smpp/ClientSmppSessionHandler.java
index 55c6cccc3..4c5522c14 100644
--- a/src/org/traccar/smpp/ClientSmppSessionHandler.java
+++ b/src/org/traccar/smpp/ClientSmppSessionHandler.java
@@ -51,7 +51,7 @@ public class ClientSmppSessionHandler extends DefaultSmppSessionHandler {
String sourceAddress = ((DeliverSm) request).getSourceAddress().getAddress();
String message = CharsetUtil.decode(((DeliverSm) request).getShortMessage(),
smppClient.mapDataCodingToCharset(((DeliverSm) request).getDataCoding()));
- LOGGER.debug("SMS Message Received: " + message.trim() + ", Source Address: " + sourceAddress);
+ LOGGER.info("SMS Message Received: " + message.trim() + ", Source Address: " + sourceAddress);
boolean isDeliveryReceipt;
if (smppClient.getDetectDlrByOpts()) {
diff --git a/src/org/traccar/smpp/SmppClient.java b/src/org/traccar/smpp/SmppClient.java
index c9869cb9c..d4f201871 100644
--- a/src/org/traccar/smpp/SmppClient.java
+++ b/src/org/traccar/smpp/SmppClient.java
@@ -211,7 +211,7 @@ public class SmppClient implements SmsManager {
private void destroySession() {
if (smppSession != null) {
- LOGGER.debug("Cleaning up SMPP session... ");
+ LOGGER.info("Cleaning up SMPP session... ");
smppSession.destroy();
smppSession = null;
}
@@ -242,7 +242,7 @@ public class SmppClient implements SmsManager {
submit.setDestAddress(new Address(destTon, destNpi, destAddress));
SubmitSmResp submitResponce = getSession().submit(submit, submitTimeout);
if (submitResponce.getCommandStatus() == SmppConstants.STATUS_OK) {
- LOGGER.debug("SMS submitted, message id: " + submitResponce.getMessageId());
+ LOGGER.info("SMS submitted, message id: " + submitResponce.getMessageId());
} else {
throw new IllegalStateException(submitResponce.getResultMessage());
}