Commit 6e58c8af authored by Andre Freyssinet's avatar Andre Freyssinet

Logging enhancements, avoid stacktrace in WARN level.

parent d211e557
/*
* JORAM: Java(TM) Open Reliable Asynchronous Messaging
* Copyright (C) 2011 - 2017 ScalAgent Distributed Technologies
* Copyright (C) 2011 - 2020 ScalAgent Distributed Technologies
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
......@@ -135,8 +135,10 @@ public class DistributionDaemon extends Daemon {
AgentServer.getTransaction().begin();
AgentServer.getTransaction().commit(true);
} catch (Exception e) {
if (logger.isLoggable(BasicLevel.WARN))
if (logger.isLoggable(BasicLevel.DEBUG))
logger.log(BasicLevel.WARN, "DistributionDaemon run()", e);
else
logger.log(BasicLevel.WARN, "DistributionDaemon run(): " + e.getMessage());
if (e instanceof EmptyQueueException) {
continue;
......
......@@ -251,8 +251,10 @@ public class DistributionQueue extends Queue {
nbMsgsDeliverSinceCreation++;
ite.remove();
} catch (Exception exc) {
if (logger.isLoggable(BasicLevel.WARN))
if (logger.isLoggable(BasicLevel.DEBUG))
logger.log(BasicLevel.WARN, "DistributionQueue.preProcess: distribution error.", exc);
else
logger.log(BasicLevel.WARN, "DistributionQueue.preProcess: distribution error - " + exc.getMessage());
// if we don't do batch distribution, stop on first error
if (!batchDistribution)
......
......@@ -174,8 +174,10 @@ public class DistributionTopic extends Topic {
nbMsgsDeliverSinceCreation++;
}
} catch (Exception exc) {
if (logger.isLoggable(BasicLevel.ERROR))
if (logger.isLoggable(BasicLevel.DEBUG))
logger.log(BasicLevel.ERROR, "DistributionTopic: error during distribution.", exc);
else
logger.log(BasicLevel.ERROR, "DistributionTopic: error during distribution - " + exc.getMessage());
if (dmqManager == null)
dmqManager = new DMQManager(cm.getDMQId(), getDMQAgentId(), getId());
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment