This is an automated email from the ASF dual-hosted git repository.

btellier pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git

commit 30e643339b693190f725798144c21a9e574f4d37
Author: Benoit Tellier <[email protected]>
AuthorDate: Fri Mar 11 08:42:13 2022 +0700

    [PERF] Avoid calling toString on IMAP commands if not strictly needed
---
 .../apache/james/imap/processor/base/AbstractChainedProcessor.java    | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git 
a/protocols/imap/src/main/java/org/apache/james/imap/processor/base/AbstractChainedProcessor.java
 
b/protocols/imap/src/main/java/org/apache/james/imap/processor/base/AbstractChainedProcessor.java
index 9eaf492..448eeb2 100644
--- 
a/protocols/imap/src/main/java/org/apache/james/imap/processor/base/AbstractChainedProcessor.java
+++ 
b/protocols/imap/src/main/java/org/apache/james/imap/processor/base/AbstractChainedProcessor.java
@@ -54,7 +54,9 @@ public abstract class AbstractChainedProcessor<M extends 
ImapMessage> implements
             M acceptableMessage = (M) message;
             try (Closeable closeable = addContextToMDC(acceptableMessage)) {
                 try {
-                    LOGGER.debug("Processing {}", message.toString());
+                    if (LOGGER.isDebugEnabled()) {
+                        LOGGER.debug("Processing {}", message.toString());
+                    }
                     doProcess(acceptableMessage, responder, session);
                 } catch (RuntimeException e) {
                     LOGGER.error("Error while processing IMAP request", e);

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to