woj-tek commented on code in PR #2386:
URL: https://github.com/apache/james-project/pull/2386#discussion_r1725316119
##########
protocols/imap/src/main/java/org/apache/james/imap/decode/main/DefaultImapDecoder.java:
##########
@@ -121,6 +119,7 @@ private ImapMessage
decodeCommandNamed(ImapRequestLineReader request, Tag tag, S
if (count == null || (int) count > 0) {
session.setAttribute(INVALID_COMMAND_COUNT, 0);
}
+ LOGGER.trace("Processing {} {} {}", tag.asString(), commandName,
message.toString());
Review Comment:
> Red flag: tostring is eagerly instanciated here
Yeah, my bad from quickly testing things.
> Wrap it in a if (LOGGER.isTraceEnabled() ?
`.trace()` do the check itself - should we check if the logger is enabled
still?
> Please put the username from the session in there.
I wonder - shouldn't this be handled by MDC (and would be more general)?
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]