clebertsuconic commented on a change in pull request #2714: ARTEMIS-2385 Log
header for rejecting message with too large header
URL: https://github.com/apache/activemq-artemis/pull/2714#discussion_r294874700
##########
File path:
artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/journal/JournalStorageManager.java
##########
@@ -556,6 +556,12 @@ public LargeServerMessage createLargeMessage(final long
id, final Message messag
final int messageEncodeSize = largeMessage.getEncodeSize();
if (messageEncodeSize > maxRecordSize) {
+ if (logger.isDebugEnabled()) {
+ logger.debug("Message header too large for " + largeMessage);
+ } else {
+ logger.warn("Message with id " + largeMessage.getMessageID()
+ " has a header too large. Set log level to debug to log the message header.");
Review comment:
two things:
- the logger.warn should always be called, no matter what.
- Can you use a Logger with an ID here?
Also, change the message as this (when you make the logger).
"Message with ID " + ID + " has a header too large. More information
available on debug level for class " PackageNameAndClass
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services