You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@activemq.apache.org by GitBox <gi...@apache.org> on 2021/03/23 07:40:09 UTC

[GitHub] [activemq] maciejmiklas commented on a change in pull request #351: ActiveMQMessageConsumer - do not log whole message including headers in WARN

maciejmiklas commented on a change in pull request #351:
URL: https://github.com/apache/activemq/pull/351#discussion_r599331606



##########
File path: activemq-client/src/main/java/org/apache/activemq/ActiveMQMessageConsumer.java
##########
@@ -1457,7 +1457,7 @@ public void dispatch(MessageDispatch md) {
                             session.getConnection().rollbackDuplicate(this, md.getMessage());
                             dispatch(md);
                         } else {
-                            LOG.warn("{} suppressing duplicate delivery on connection, poison acking: {}", getConsumerId(), md);
+                            LOG.warn("{} suppressing duplicate delivery on connection, poison acking: {}", getConsumerId(), md.getMessage());

Review comment:
       You can add another line, that logs content of the message in DEBUG, but logging whole message in WARN is a logging-anti-pattern. We have Productive system that is processing millions of messages every day, it runs in INFO and I really like to see in log only important stuff and now it drops messages into log, where each WARN has a size of A4-page. 




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org