james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From adup...@apache.org
Subject [08/34] james-project git commit: JAMES-2085 IMAP should consider raw MailboxException as unexpected
Date Wed, 05 Jul 2017 13:59:15 GMT
JAMES-2085 IMAP should consider raw MailboxException as unexpected


Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/0ddf44bf
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/0ddf44bf
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/0ddf44bf

Branch: refs/heads/master
Commit: 0ddf44bf5e74f2c2a444f12b0acf9c369637b622
Parents: 624cd01
Author: benwa <btellier@linagora.com>
Authored: Mon Jul 3 11:51:32 2017 +0700
Committer: benwa <btellier@linagora.com>
Committed: Wed Jul 5 17:13:43 2017 +0700

----------------------------------------------------------------------
 .../imap/api/display/HumanReadableText.java     |  6 +++++
 .../imap/processor/AbstractAuthProcessor.java   |  4 +---
 .../processor/AbstractMailboxProcessor.java     |  3 +--
 .../AbstractMessageRangeProcessor.java          |  9 +++----
 .../processor/AbstractSelectionProcessor.java   |  2 +-
 .../james/imap/processor/AppendProcessor.java   | 19 ++++-----------
 .../james/imap/processor/CloseProcessor.java    |  4 +---
 .../james/imap/processor/CreateProcessor.java   |  4 +---
 .../imap/processor/DeleteACLProcessor.java      |  6 +----
 .../james/imap/processor/DeleteProcessor.java   |  4 +---
 .../james/imap/processor/ExpungeProcessor.java  |  4 +---
 .../james/imap/processor/GetACLProcessor.java   |  6 +----
 .../imap/processor/GetAnnotationProcessor.java  |  2 +-
 .../james/imap/processor/IdleProcessor.java     | 11 +++------
 .../james/imap/processor/LSubProcessor.java     |  4 +---
 .../james/imap/processor/ListProcessor.java     | 25 ++++----------------
 .../imap/processor/ListRightsProcessor.java     |  6 +----
 .../james/imap/processor/LogoutProcessor.java   |  4 +---
 .../james/imap/processor/MyRightsProcessor.java |  5 +---
 .../james/imap/processor/RenameProcessor.java   |  6 ++---
 .../james/imap/processor/SearchProcessor.java   |  4 +---
 .../james/imap/processor/SetACLProcessor.java   |  6 +----
 .../imap/processor/SetAnnotationProcessor.java  |  2 +-
 .../james/imap/processor/StatusProcessor.java   |  4 +---
 .../james/imap/processor/StoreProcessor.java    |  8 +++----
 .../imap/processor/SystemMessageProcessor.java  |  6 ++---
 .../processor/base/SelectedMailboxImpl.java     |  4 +---
 .../processor/fetch/ContentBodyElement.java     |  2 +-
 .../imap/processor/fetch/FetchProcessor.java    | 12 ++++------
 29 files changed, 55 insertions(+), 127 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-project/blob/0ddf44bf/protocols/imap/src/main/java/org/apache/james/imap/api/display/HumanReadableText.java
----------------------------------------------------------------------
diff --git a/protocols/imap/src/main/java/org/apache/james/imap/api/display/HumanReadableText.java
b/protocols/imap/src/main/java/org/apache/james/imap/api/display/HumanReadableText.java
index 57a98e0..d126f2e 100644
--- a/protocols/imap/src/main/java/org/apache/james/imap/api/display/HumanReadableText.java
+++ b/protocols/imap/src/main/java/org/apache/james/imap/api/display/HumanReadableText.java
@@ -25,6 +25,8 @@ import javax.mail.Flags;
 
 import org.apache.james.imap.api.ImapConstants;
 
+import com.google.common.base.Joiner;
+
 /**
  * Keys human response text that may be displayed to the user.
  */
@@ -259,4 +261,8 @@ public class HumanReadableText {
     public String toString() {
         return defaultValue;
     }
+
+    public String asString() {
+        return key + " " + defaultValue + "[" + Joiner.on(", ").join(parameters) + "]";
+    }
 }

http://git-wip-us.apache.org/repos/asf/james-project/blob/0ddf44bf/protocols/imap/src/main/java/org/apache/james/imap/processor/AbstractAuthProcessor.java
----------------------------------------------------------------------
diff --git a/protocols/imap/src/main/java/org/apache/james/imap/processor/AbstractAuthProcessor.java
b/protocols/imap/src/main/java/org/apache/james/imap/processor/AbstractAuthProcessor.java
index 54b5d4f..8f7fbd0 100644
--- a/protocols/imap/src/main/java/org/apache/james/imap/processor/AbstractAuthProcessor.java
+++ b/protocols/imap/src/main/java/org/apache/james/imap/processor/AbstractAuthProcessor.java
@@ -77,9 +77,7 @@ public abstract class AbstractAuthProcessor<M extends ImapRequest>
extends Abstr
                 manageFailureCount(session, tag, command, responder, failed);
             }
         } catch (MailboxException e) {
-            if (session.getLog().isInfoEnabled()) {
-                session.getLog().info("Login failed", e);
-            }
+            session.getLog().error("Error encountered while login", e);
             no(command, tag, responder, HumanReadableText.GENERIC_FAILURE_DURING_PROCESSING);
         }
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/0ddf44bf/protocols/imap/src/main/java/org/apache/james/imap/processor/AbstractMailboxProcessor.java
----------------------------------------------------------------------
diff --git a/protocols/imap/src/main/java/org/apache/james/imap/processor/AbstractMailboxProcessor.java
b/protocols/imap/src/main/java/org/apache/james/imap/processor/AbstractMailboxProcessor.java
index 59fb616..66e828f 100644
--- a/protocols/imap/src/main/java/org/apache/james/imap/processor/AbstractMailboxProcessor.java
+++ b/protocols/imap/src/main/java/org/apache/james/imap/processor/AbstractMailboxProcessor.java
@@ -320,8 +320,7 @@ abstract public class AbstractMailboxProcessor<M extends ImapRequest>
extends Ab
     }
 
     private void handleResponseException(ImapProcessor.Responder responder, MailboxException
e, HumanReadableText message, ImapSession session) {
-        session.getLog().info(message.toString());
-        session.getLog().debug(message.toString(), e);
+        session.getLog().error(message.toString(), e);
         // TODO: consider whether error message should be passed to the user
         final StatusResponse response = factory.untaggedNo(message);
         responder.respond(response);

http://git-wip-us.apache.org/repos/asf/james-project/blob/0ddf44bf/protocols/imap/src/main/java/org/apache/james/imap/processor/AbstractMessageRangeProcessor.java
----------------------------------------------------------------------
diff --git a/protocols/imap/src/main/java/org/apache/james/imap/processor/AbstractMessageRangeProcessor.java
b/protocols/imap/src/main/java/org/apache/james/imap/processor/AbstractMessageRangeProcessor.java
index e845096..7a58e67 100644
--- a/protocols/imap/src/main/java/org/apache/james/imap/processor/AbstractMessageRangeProcessor.java
+++ b/protocols/imap/src/main/java/org/apache/james/imap/processor/AbstractMessageRangeProcessor.java
@@ -42,6 +42,9 @@ import org.apache.james.mailbox.model.MailboxPath;
 import org.apache.james.mailbox.model.MessageRange;
 import org.apache.james.metrics.api.MetricFactory;
 
+import com.google.common.collect.ImmutableList;
+import com.google.common.collect.Lists;
+
 public abstract class AbstractMessageRangeProcessor<M extends AbstractMessageRangeRequest>
extends AbstractMailboxProcessor<M> {
 
     public AbstractMessageRangeProcessor(Class<M> acceptableClass, ImapProcessor next,
MailboxManager mailboxManager, StatusResponseFactory factory,
@@ -104,13 +107,11 @@ public abstract class AbstractMessageRangeProcessor<M extends AbstractMessageRan
             }
         } catch (MessageRangeException e) {
             if (session.getLog().isDebugEnabled()) {
-                session.getLog().debug(getOperationName() + " failed from mailbox " + currentMailbox.getPath()
+ " to " + targetMailbox + " for invalid sequence-set " + idSet.toString(), e);
+                session.getLog().debug(getOperationName() + " failed from mailbox " + currentMailbox.getPath()
+ " to " + targetMailbox + " for invalid sequence-set " + ImmutableList.copyOf(idSet), e);
             }
             taggedBad(command, tag, responder, HumanReadableText.INVALID_MESSAGESET);
         } catch (MailboxException e) {
-            if (session.getLog().isInfoEnabled()) {
-                session.getLog().info(getOperationName() + " failed from mailbox " + currentMailbox.getPath()
+ " to " + targetMailbox + " for sequence-set " + idSet.toString(), e);
-            }
+            session.getLog().error(getOperationName() + " failed from mailbox " + currentMailbox.getPath()
+ " to " + targetMailbox + " for sequence-set " + ImmutableList.copyOf(idSet), e);
             no(command, tag, responder, HumanReadableText.GENERIC_FAILURE_DURING_PROCESSING);
         }
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/0ddf44bf/protocols/imap/src/main/java/org/apache/james/imap/processor/AbstractSelectionProcessor.java
----------------------------------------------------------------------
diff --git a/protocols/imap/src/main/java/org/apache/james/imap/processor/AbstractSelectionProcessor.java
b/protocols/imap/src/main/java/org/apache/james/imap/processor/AbstractSelectionProcessor.java
index e5a98c0..4a80611 100644
--- a/protocols/imap/src/main/java/org/apache/james/imap/processor/AbstractSelectionProcessor.java
+++ b/protocols/imap/src/main/java/org/apache/james/imap/processor/AbstractSelectionProcessor.java
@@ -92,7 +92,7 @@ abstract class AbstractSelectionProcessor<M extends AbstractMailboxSelectionRequ
             session.getLog().debug("Select failed as mailbox does not exist " + mailboxName,
e);
             responder.respond(statusResponseFactory.taggedNo(tag, command, HumanReadableText.FAILURE_NO_SUCH_MAILBOX));
         } catch (MailboxException e) {
-            session.getLog().info("Select failed for mailbox " + mailboxName , e);
+            session.getLog().error("Select failed for mailbox " + mailboxName , e);
             no(command, tag, responder, HumanReadableText.SELECT);
         } 
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/0ddf44bf/protocols/imap/src/main/java/org/apache/james/imap/processor/AppendProcessor.java
----------------------------------------------------------------------
diff --git a/protocols/imap/src/main/java/org/apache/james/imap/processor/AppendProcessor.java
b/protocols/imap/src/main/java/org/apache/james/imap/processor/AppendProcessor.java
index 2d976c7..5bc46fd 100644
--- a/protocols/imap/src/main/java/org/apache/james/imap/processor/AppendProcessor.java
+++ b/protocols/imap/src/main/java/org/apache/james/imap/processor/AppendProcessor.java
@@ -88,7 +88,7 @@ public class AppendProcessor extends AbstractMailboxProcessor<AppendRequest>
{
             // consume message on exception
             consume(messageIn);
             
-            session.getLog().info("Append failed for mailbox " + mailboxPath, e);
+            session.getLog().error("Append failed for mailbox " + mailboxPath, e);
             
             // Some other issue
             no(command, tag, responder, HumanReadableText.GENERIC_FAILURE_DURING_PROCESSING);
@@ -121,11 +121,7 @@ public class AppendProcessor extends AbstractMailboxProcessor<AppendRequest>
{
      *            not null
      */
     private void tryCreate(ImapSession session, String tag, ImapCommand command, Responder
responder, MailboxNotFoundException e) {
-
-        final Logger logger = session.getLog();
-        if (logger.isDebugEnabled()) {
-            logger.debug("Cannot open mailbox: ", e);
-        }
+        session.getLog().debug("Cannot open mailbox: ", e);
 
         no(command, tag, responder, HumanReadableText.FAILURE_NO_SUCH_MAILBOX, StatusResponse.ResponseCode.tryCreate());
     }
@@ -146,21 +142,14 @@ public class AppendProcessor extends AbstractMailboxProcessor<AppendRequest>
{
 
             unsolicitedResponses(session, responder, false);
 
-            // in case of MULTIAPPEND support we will push more then one UID
-            // here
+            // in case of MULTIAPPEND support we will push more then one UID here
             okComplete(command, tag, ResponseCode.appendUid(uidValidity, new UidRange[] {
new UidRange(messageId.getUid()) }), responder);
         } catch (MailboxNotFoundException e) {
             // Indicates that the mailbox does not exist
             // So TRY CREATE
             tryCreate(session, tag, command, responder, e);
-            /*
-             * } catch (StorageException e) { taggedBad(command, tag, responder,
-             * e.getKey());
-             */
         } catch (MailboxException e) {
-            if (session.getLog().isInfoEnabled()) {
-                session.getLog().info("Unable to append message to mailbox " + mailboxPath,
e);
-            }
+            session.getLog().error("Unable to append message to mailbox " + mailboxPath,
e);
             // Some other issue
             no(command, tag, responder, HumanReadableText.SAVE_FAILED);
         }

http://git-wip-us.apache.org/repos/asf/james-project/blob/0ddf44bf/protocols/imap/src/main/java/org/apache/james/imap/processor/CloseProcessor.java
----------------------------------------------------------------------
diff --git a/protocols/imap/src/main/java/org/apache/james/imap/processor/CloseProcessor.java
b/protocols/imap/src/main/java/org/apache/james/imap/processor/CloseProcessor.java
index 477ded2..195086b 100644
--- a/protocols/imap/src/main/java/org/apache/james/imap/processor/CloseProcessor.java
+++ b/protocols/imap/src/main/java/org/apache/james/imap/processor/CloseProcessor.java
@@ -57,9 +57,7 @@ public class CloseProcessor extends AbstractMailboxProcessor<CloseRequest>
{
             }
 
         } catch (MailboxException e) {
-            if (session.getLog().isInfoEnabled()) {
-                session.getLog().info("Close failed for mailbox " + session.getSelected().getPath()
, e);
-            }
+            session.getLog().error("Close failed for mailbox " + session.getSelected().getPath()
, e);
             no(command, tag, responder, HumanReadableText.GENERIC_FAILURE_DURING_PROCESSING);
         }
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/0ddf44bf/protocols/imap/src/main/java/org/apache/james/imap/processor/CreateProcessor.java
----------------------------------------------------------------------
diff --git a/protocols/imap/src/main/java/org/apache/james/imap/processor/CreateProcessor.java
b/protocols/imap/src/main/java/org/apache/james/imap/processor/CreateProcessor.java
index 36c7385..66ad8ed 100644
--- a/protocols/imap/src/main/java/org/apache/james/imap/processor/CreateProcessor.java
+++ b/protocols/imap/src/main/java/org/apache/james/imap/processor/CreateProcessor.java
@@ -66,9 +66,7 @@ public class CreateProcessor extends AbstractMailboxProcessor<CreateRequest>
{
             }
             taggedBad(command, tag, responder, HumanReadableText.FAILURE_MAILBOX_NAME);
         } catch (MailboxException e) {
-            if (session.getLog().isInfoEnabled()) {
-                session.getLog().info("Create failed for mailbox " + mailboxPath, e);
-            }
+            session.getLog().error("Create failed for mailbox " + mailboxPath, e);
             no(command, tag, responder, HumanReadableText.GENERIC_FAILURE_DURING_PROCESSING);
         }
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/0ddf44bf/protocols/imap/src/main/java/org/apache/james/imap/processor/DeleteACLProcessor.java
----------------------------------------------------------------------
diff --git a/protocols/imap/src/main/java/org/apache/james/imap/processor/DeleteACLProcessor.java
b/protocols/imap/src/main/java/org/apache/james/imap/processor/DeleteACLProcessor.java
index 86d5a14..742b4dc 100644
--- a/protocols/imap/src/main/java/org/apache/james/imap/processor/DeleteACLProcessor.java
+++ b/protocols/imap/src/main/java/org/apache/james/imap/processor/DeleteACLProcessor.java
@@ -43,7 +43,6 @@ import org.apache.james.mailbox.model.SimpleMailboxACL;
 import org.apache.james.mailbox.model.SimpleMailboxACL.Rfc4314Rights;
 import org.apache.james.mailbox.model.SimpleMailboxACL.SimpleMailboxACLEntryKey;
 import org.apache.james.metrics.api.MetricFactory;
-import org.slf4j.Logger;
 
 /**
  * DELETEACL Processor.
@@ -128,10 +127,7 @@ public class DeleteACLProcessor extends AbstractMailboxProcessor<DeleteACLReques
         } catch (MailboxNotFoundException e) {
             no(command, tag, responder, HumanReadableText.MAILBOX_NOT_FOUND);
         } catch (MailboxException e) {
-            Logger log = session.getLog();
-            if (log.isInfoEnabled()) {
-                log.info(command.getName() +" failed for mailbox " + mailboxName, e);
-            }
+            session.getLog().error(command.getName() +" failed for mailbox " + mailboxName,
e);
             no(command, tag, responder, HumanReadableText.GENERIC_FAILURE_DURING_PROCESSING);
         }
 

http://git-wip-us.apache.org/repos/asf/james-project/blob/0ddf44bf/protocols/imap/src/main/java/org/apache/james/imap/processor/DeleteProcessor.java
----------------------------------------------------------------------
diff --git a/protocols/imap/src/main/java/org/apache/james/imap/processor/DeleteProcessor.java
b/protocols/imap/src/main/java/org/apache/james/imap/processor/DeleteProcessor.java
index 4b212a9..20b2be7 100644
--- a/protocols/imap/src/main/java/org/apache/james/imap/processor/DeleteProcessor.java
+++ b/protocols/imap/src/main/java/org/apache/james/imap/processor/DeleteProcessor.java
@@ -71,9 +71,7 @@ public class DeleteProcessor extends AbstractMailboxProcessor<DeleteRequest>
{
             }
             taggedBad(command, tag, responder, HumanReadableText.FAILURE_MAILBOX_NAME);
         } catch (MailboxException e) {
-            if (session.getLog().isInfoEnabled()) {
-                session.getLog().info("Delete failed for mailbox " + mailboxPath, e);
-            }
+            session.getLog().error("Delete failed for mailbox " + mailboxPath, e);
             no(command, tag, responder, HumanReadableText.GENERIC_FAILURE_DURING_PROCESSING);
         }
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/0ddf44bf/protocols/imap/src/main/java/org/apache/james/imap/processor/ExpungeProcessor.java
----------------------------------------------------------------------
diff --git a/protocols/imap/src/main/java/org/apache/james/imap/processor/ExpungeProcessor.java
b/protocols/imap/src/main/java/org/apache/james/imap/processor/ExpungeProcessor.java
index 8e6bb15..bca50c3 100644
--- a/protocols/imap/src/main/java/org/apache/james/imap/processor/ExpungeProcessor.java
+++ b/protocols/imap/src/main/java/org/apache/james/imap/processor/ExpungeProcessor.java
@@ -99,9 +99,7 @@ public class ExpungeProcessor extends AbstractMailboxProcessor<ExpungeRequest>
i
             }
             taggedBad(command, tag, responder, HumanReadableText.INVALID_MESSAGESET);
         } catch (MailboxException e) {
-            if (session.getLog().isInfoEnabled()) {
-                session.getLog().info("Expunge failed for mailbox " + session.getSelected().getPath(),
e);
-            }
+            session.getLog().error("Expunge failed for mailbox " + session.getSelected().getPath(),
e);
             no(command, tag, responder, HumanReadableText.GENERIC_FAILURE_DURING_PROCESSING);
         }
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/0ddf44bf/protocols/imap/src/main/java/org/apache/james/imap/processor/GetACLProcessor.java
----------------------------------------------------------------------
diff --git a/protocols/imap/src/main/java/org/apache/james/imap/processor/GetACLProcessor.java
b/protocols/imap/src/main/java/org/apache/james/imap/processor/GetACLProcessor.java
index 2e7edf9..25270f5 100644
--- a/protocols/imap/src/main/java/org/apache/james/imap/processor/GetACLProcessor.java
+++ b/protocols/imap/src/main/java/org/apache/james/imap/processor/GetACLProcessor.java
@@ -42,7 +42,6 @@ import org.apache.james.mailbox.exception.MailboxNotFoundException;
 import org.apache.james.mailbox.model.MailboxPath;
 import org.apache.james.mailbox.model.SimpleMailboxACL.Rfc4314Rights;
 import org.apache.james.metrics.api.MetricFactory;
-import org.slf4j.Logger;
 
 /**
  * GETACL Processor.
@@ -102,10 +101,7 @@ public class GetACLProcessor extends AbstractMailboxProcessor<GetACLRequest>
imp
         } catch (MailboxNotFoundException e) {
             no(command, tag, responder, HumanReadableText.MAILBOX_NOT_FOUND);
         } catch (MailboxException e) {
-            Logger log = session.getLog();
-            if (log.isInfoEnabled()) {
-                log.info(command.getName() +" failed for mailbox " + mailboxName, e);
-            }
+            session.getLog().error(command.getName() +" failed for mailbox " + mailboxName,
e);
             no(command, tag, responder, HumanReadableText.GENERIC_FAILURE_DURING_PROCESSING);
         }
 

http://git-wip-us.apache.org/repos/asf/james-project/blob/0ddf44bf/protocols/imap/src/main/java/org/apache/james/imap/processor/GetAnnotationProcessor.java
----------------------------------------------------------------------
diff --git a/protocols/imap/src/main/java/org/apache/james/imap/processor/GetAnnotationProcessor.java
b/protocols/imap/src/main/java/org/apache/james/imap/processor/GetAnnotationProcessor.java
index 03fdfff..c68cb76 100644
--- a/protocols/imap/src/main/java/org/apache/james/imap/processor/GetAnnotationProcessor.java
+++ b/protocols/imap/src/main/java/org/apache/james/imap/processor/GetAnnotationProcessor.java
@@ -69,7 +69,7 @@ public class GetAnnotationProcessor extends AbstractMailboxProcessor<GetAnnotati
             session.getLog().info("The command: {} is failed because not found mailbox {}",
command.getName(), message.getMailboxName());
             no(command, tag, responder, HumanReadableText.FAILURE_NO_SUCH_MAILBOX, ResponseCode.tryCreate());
         } catch (MailboxException e) {
-            session.getLog().info("The command: {} on mailbox {} is failed", command.getName(),
message.getMailboxName());
+            session.getLog().error("GetAnnotation on mailbox " + message.getMailboxName()
+ " failed for user " + ImapSessionUtils.getUserName(session), e);
             no(command, tag, responder, HumanReadableText.GENERIC_FAILURE_DURING_PROCESSING);
         }
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/0ddf44bf/protocols/imap/src/main/java/org/apache/james/imap/processor/IdleProcessor.java
----------------------------------------------------------------------
diff --git a/protocols/imap/src/main/java/org/apache/james/imap/processor/IdleProcessor.java
b/protocols/imap/src/main/java/org/apache/james/imap/processor/IdleProcessor.java
index 46cf5e3..e02043a 100644
--- a/protocols/imap/src/main/java/org/apache/james/imap/processor/IdleProcessor.java
+++ b/protocols/imap/src/main/java/org/apache/james/imap/processor/IdleProcessor.java
@@ -82,7 +82,7 @@ public class IdleProcessor extends AbstractMailboxProcessor<IdleRequest>
impleme
             final MailboxManager mailboxManager = getMailboxManager();
             final MailboxSession mailboxSession = ImapSessionUtils.getMailboxSession(session);
             final SelectedMailbox sm = session.getSelected();
-            final MailboxListener idleListener;
+            final IdleMailboxListener idleListener;
             if (sm != null) {
                 idleListener = new IdleMailboxListener(session, responder);
                 mailboxManager.addListener(sm.getPath(), idleListener , mailboxSession);
@@ -111,9 +111,7 @@ public class IdleProcessor extends AbstractMailboxProcessor<IdleRequest>
impleme
                         try {
                             mailboxManager.removeListener(sm.getPath(), idleListener, mailboxSession);
                         } catch (MailboxException e) {
-                            if (session.getLog().isInfoEnabled()) {
-                                session.getLog().info("Unable to remove idle listener from
mailbox", e);
-                            }
+                                session.getLog().error("Unable to remove idle listener for
mailbox {0}", sm.getPath(), e);
                         }
                     }
                     session.popLineHandler();
@@ -161,10 +159,7 @@ public class IdleProcessor extends AbstractMailboxProcessor<IdleRequest>
impleme
 
 
         } catch (MailboxException e) {
-            if (session.getLog().isInfoEnabled()) {
-                session.getLog().info("Enable idle for " + session.getSelected().getPath()
+ " failed", e);
-            }
-            // TODO: What should we do here?
+            session.getLog().error("Enable idle for " + session.getSelected().getPath() +
" failed", e);
             no(command, tag, responder, HumanReadableText.GENERIC_FAILURE_DURING_PROCESSING);
         }
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/0ddf44bf/protocols/imap/src/main/java/org/apache/james/imap/processor/LSubProcessor.java
----------------------------------------------------------------------
diff --git a/protocols/imap/src/main/java/org/apache/james/imap/processor/LSubProcessor.java
b/protocols/imap/src/main/java/org/apache/james/imap/processor/LSubProcessor.java
index 7a3cba0..f062ec0 100644
--- a/protocols/imap/src/main/java/org/apache/james/imap/processor/LSubProcessor.java
+++ b/protocols/imap/src/main/java/org/apache/james/imap/processor/LSubProcessor.java
@@ -126,9 +126,7 @@ public class LSubProcessor extends AbstractSubscriptionProcessor<LsubRequest>
{
 
             okComplete(command, tag, responder);
         } catch (MailboxException e) {
-            if (session.getLog().isInfoEnabled()) {
-                session.getLog().info("LSub failed for reference " + referenceName + " and
pattern " + mailboxPattern, e);
-            }
+            session.getLog().error("LSub failed for reference " + referenceName + " and pattern
" + mailboxPattern, e);
             final HumanReadableText displayTextKey = HumanReadableText.GENERIC_LSUB_FAILURE;
             no(command, tag, responder, displayTextKey);
         }

http://git-wip-us.apache.org/repos/asf/james-project/blob/0ddf44bf/protocols/imap/src/main/java/org/apache/james/imap/processor/ListProcessor.java
----------------------------------------------------------------------
diff --git a/protocols/imap/src/main/java/org/apache/james/imap/processor/ListProcessor.java
b/protocols/imap/src/main/java/org/apache/james/imap/processor/ListProcessor.java
index 7004737..8a450c2 100644
--- a/protocols/imap/src/main/java/org/apache/james/imap/processor/ListProcessor.java
+++ b/protocols/imap/src/main/java/org/apache/james/imap/processor/ListProcessor.java
@@ -92,15 +92,13 @@ public class ListProcessor extends AbstractMailboxProcessor<ListRequest>
{
      * @param responder
      */
     protected final void doProcess(String referenceName, String mailboxName, ImapSession
session, String tag, ImapCommand command, Responder responder, MailboxTyper mailboxTyper)
{
+        String user = ImapSessionUtils.getUserName(session);
+        final MailboxSession mailboxSession = ImapSessionUtils.getMailboxSession(session);
         try {
             // Should the namespace section be returned or not?
             final boolean isRelative;
-
             final List<MailboxMetaData> results;
 
-            final String user = ImapSessionUtils.getUserName(session);
-            final MailboxSession mailboxSession = ImapSessionUtils.getMailboxSession(session);
-
             if (mailboxName.length() == 0) {
                 // An empty mailboxName signifies a request for the hierarchy
                 // delimiter and root name of the referenceName argument
@@ -127,31 +125,18 @@ public class ListProcessor extends AbstractMailboxProcessor<ListRequest>
{
                 results = new ArrayList<MailboxMetaData>(1);
                 results.add(new MailboxMetaData() {
 
-                    /**
-                     * @see org.apache.james.mailbox.MailboxMetaData#inferiors()
-                     */
                     public Children inferiors() {
                         return Children.CHILDREN_ALLOWED_BUT_UNKNOWN;
                     }
 
-                    /**
-                     * @see org.apache.james.mailbox.MailboxMetaData#getSelectability()
-                     */
                     public Selectability getSelectability() {
                         return Selectability.NOSELECT;
                     }
-
-                    /**
-                     * @see org.apache.james.mailbox.MailboxMetaData#getHierarchyDelimiter()
-                     */
+                    
                     public char getHierarchyDelimiter() {
                         return mailboxSession.getPathDelimiter();
                     }
 
-                    /**
-                     * (non-Javadoc)
-                     * @see org.apache.james.mailbox.MailboxMetaData#getPath()
-                     */
                     public MailboxPath getPath() {
                         return rootPath;
                     }
@@ -190,9 +175,7 @@ public class ListProcessor extends AbstractMailboxProcessor<ListRequest>
{
 
             okComplete(command, tag, responder);
         } catch (MailboxException e) {
-            if (session.getLog().isInfoEnabled()) {
-                session.getLog().info("List failed", e);
-            }
+            session.getLog().error("List failed for mailboxName " + mailboxName + " and user"
+ user, e);
             no(command, tag, responder, HumanReadableText.SEARCH_FAILED);
         }
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/0ddf44bf/protocols/imap/src/main/java/org/apache/james/imap/processor/ListRightsProcessor.java
----------------------------------------------------------------------
diff --git a/protocols/imap/src/main/java/org/apache/james/imap/processor/ListRightsProcessor.java
b/protocols/imap/src/main/java/org/apache/james/imap/processor/ListRightsProcessor.java
index cb69d0e..cb8c7a6 100644
--- a/protocols/imap/src/main/java/org/apache/james/imap/processor/ListRightsProcessor.java
+++ b/protocols/imap/src/main/java/org/apache/james/imap/processor/ListRightsProcessor.java
@@ -42,7 +42,6 @@ import org.apache.james.mailbox.model.MailboxPath;
 import org.apache.james.mailbox.model.SimpleMailboxACL.Rfc4314Rights;
 import org.apache.james.mailbox.model.SimpleMailboxACL.SimpleMailboxACLEntryKey;
 import org.apache.james.metrics.api.MetricFactory;
-import org.slf4j.Logger;
 
 /**
  * LISTRIGHTS Processor.
@@ -118,10 +117,7 @@ public class ListRightsProcessor extends AbstractMailboxProcessor<ListRightsRequ
         } catch (MailboxNotFoundException e) {
             no(command, tag, responder, HumanReadableText.MAILBOX_NOT_FOUND);
         } catch (MailboxException e) {
-            Logger log = session.getLog();
-            if (log.isInfoEnabled()) {
-                log.info(command.getName() +" failed for mailbox " + mailboxName, e);
-            }
+            session.getLog().error(command.getName() + " failed for mailbox " + mailboxName,
e);
             no(command, tag, responder, HumanReadableText.GENERIC_FAILURE_DURING_PROCESSING);
         }
 

http://git-wip-us.apache.org/repos/asf/james-project/blob/0ddf44bf/protocols/imap/src/main/java/org/apache/james/imap/processor/LogoutProcessor.java
----------------------------------------------------------------------
diff --git a/protocols/imap/src/main/java/org/apache/james/imap/processor/LogoutProcessor.java
b/protocols/imap/src/main/java/org/apache/james/imap/processor/LogoutProcessor.java
index f15dc18..acec17c 100644
--- a/protocols/imap/src/main/java/org/apache/james/imap/processor/LogoutProcessor.java
+++ b/protocols/imap/src/main/java/org/apache/james/imap/processor/LogoutProcessor.java
@@ -46,9 +46,7 @@ public class LogoutProcessor extends AbstractMailboxProcessor<LogoutRequest>
{
             bye(responder);
             okComplete(command, tag, responder);
         } catch (MailboxException e) {
-            if (session.getLog().isInfoEnabled()) {
-                session.getLog().info("Logout failed", e);
-            }
+            session.getLog().error("Logout failed for user " + mailboxSession.getUser().getUserName(),
e);
             no(command, tag, responder, HumanReadableText.GENERIC_FAILURE_DURING_PROCESSING);
         }
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/0ddf44bf/protocols/imap/src/main/java/org/apache/james/imap/processor/MyRightsProcessor.java
----------------------------------------------------------------------
diff --git a/protocols/imap/src/main/java/org/apache/james/imap/processor/MyRightsProcessor.java
b/protocols/imap/src/main/java/org/apache/james/imap/processor/MyRightsProcessor.java
index aad1ad5..d011ff5 100644
--- a/protocols/imap/src/main/java/org/apache/james/imap/processor/MyRightsProcessor.java
+++ b/protocols/imap/src/main/java/org/apache/james/imap/processor/MyRightsProcessor.java
@@ -99,10 +99,7 @@ public class MyRightsProcessor extends AbstractMailboxProcessor<MyRightsRequest>
         } catch (MailboxNotFoundException e) {
             no(command, tag, responder, HumanReadableText.MAILBOX_NOT_FOUND);
         } catch (MailboxException e) {
-            Logger log = session.getLog();
-            if (log.isInfoEnabled()) {
-                log.info(command.getName() + " failed for mailbox " + mailboxName, e);
-            }
+            session.getLog().error(command.getName() + " failed for mailbox " + mailboxName,
e);
             no(command, tag, responder, HumanReadableText.GENERIC_FAILURE_DURING_PROCESSING);
         }
 

http://git-wip-us.apache.org/repos/asf/james-project/blob/0ddf44bf/protocols/imap/src/main/java/org/apache/james/imap/processor/RenameProcessor.java
----------------------------------------------------------------------
diff --git a/protocols/imap/src/main/java/org/apache/james/imap/processor/RenameProcessor.java
b/protocols/imap/src/main/java/org/apache/james/imap/processor/RenameProcessor.java
index a52aa3a..2ce9187 100644
--- a/protocols/imap/src/main/java/org/apache/james/imap/processor/RenameProcessor.java
+++ b/protocols/imap/src/main/java/org/apache/james/imap/processor/RenameProcessor.java
@@ -61,7 +61,7 @@ public class RenameProcessor extends AbstractMailboxProcessor<RenameRequest>
{
             MailboxSession mailboxsession = ImapSessionUtils.getMailboxSession(session);
             mailboxManager.renameMailbox(existingPath, newPath, mailboxsession);
 
-            if (existingPath.getName().equalsIgnoreCase(ImapConstants.INBOX_NAME) &&
mailboxManager.mailboxExists(existingPath, mailboxsession) == false) {
+            if (existingPath.getName().equalsIgnoreCase(ImapConstants.INBOX_NAME) &&
!mailboxManager.mailboxExists(existingPath, mailboxsession)) {
                 mailboxManager.createMailbox(existingPath, mailboxsession);
             }
             okComplete(command, tag, responder);
@@ -82,9 +82,7 @@ public class RenameProcessor extends AbstractMailboxProcessor<RenameRequest>
{
             }
             taggedBad(command, tag, responder, HumanReadableText.FAILURE_MAILBOX_NAME);
         } catch (MailboxException e) {
-            if (session.getLog().isInfoEnabled()) {
-                session.getLog().info("Rename from " + existingPath + " to " + newPath +
" failed", e);
-            }
+            session.getLog().error("Rename from " + existingPath + " to " + newPath + " failed",
e);
             no(command, tag, responder, HumanReadableText.GENERIC_FAILURE_DURING_PROCESSING);
         }
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/0ddf44bf/protocols/imap/src/main/java/org/apache/james/imap/processor/SearchProcessor.java
----------------------------------------------------------------------
diff --git a/protocols/imap/src/main/java/org/apache/james/imap/processor/SearchProcessor.java
b/protocols/imap/src/main/java/org/apache/james/imap/processor/SearchProcessor.java
index c3ca21f..cce35f8 100644
--- a/protocols/imap/src/main/java/org/apache/james/imap/processor/SearchProcessor.java
+++ b/protocols/imap/src/main/java/org/apache/james/imap/processor/SearchProcessor.java
@@ -204,9 +204,7 @@ public class SearchProcessor extends AbstractMailboxProcessor<SearchRequest>
imp
             }
             taggedBad(command, tag, responder, HumanReadableText.INVALID_MESSAGESET);
         } catch (MailboxException e) {
-            if (session.getLog().isInfoEnabled()) {
-                session.getLog().info("Search failed in mailbox " + session.getSelected().getPath(),
e);
-            }
+            session.getLog().error("Search failed in mailbox " + session.getSelected().getPath(),
e);
             no(command, tag, responder, HumanReadableText.SEARCH_FAILED);
             
             if (resultOptions.contains(SearchResultOption.SAVE)) {

http://git-wip-us.apache.org/repos/asf/james-project/blob/0ddf44bf/protocols/imap/src/main/java/org/apache/james/imap/processor/SetACLProcessor.java
----------------------------------------------------------------------
diff --git a/protocols/imap/src/main/java/org/apache/james/imap/processor/SetACLProcessor.java
b/protocols/imap/src/main/java/org/apache/james/imap/processor/SetACLProcessor.java
index e37da8f..8d26d3e 100644
--- a/protocols/imap/src/main/java/org/apache/james/imap/processor/SetACLProcessor.java
+++ b/protocols/imap/src/main/java/org/apache/james/imap/processor/SetACLProcessor.java
@@ -45,7 +45,6 @@ import org.apache.james.mailbox.model.SimpleMailboxACL;
 import org.apache.james.mailbox.model.SimpleMailboxACL.Rfc4314Rights;
 import org.apache.james.mailbox.model.SimpleMailboxACL.SimpleMailboxACLEntryKey;
 import org.apache.james.metrics.api.MetricFactory;
-import org.slf4j.Logger;
 
 /**
  * SETACL Processor.
@@ -148,10 +147,7 @@ public class SetACLProcessor extends AbstractMailboxProcessor<SetACLRequest>
imp
         } catch (MailboxNotFoundException e) {
             no(command, tag, responder, HumanReadableText.MAILBOX_NOT_FOUND);
         } catch (MailboxException e) {
-            Logger log = session.getLog();
-            if (log.isInfoEnabled()) {
-                log.info(command.getName() +" failed for mailbox " + mailboxName, e);
-            }
+            session.getLog().error(command.getName() + " failed for mailbox " + mailboxName,
e);
             no(command, tag, responder, HumanReadableText.GENERIC_FAILURE_DURING_PROCESSING);
         }
 

http://git-wip-us.apache.org/repos/asf/james-project/blob/0ddf44bf/protocols/imap/src/main/java/org/apache/james/imap/processor/SetAnnotationProcessor.java
----------------------------------------------------------------------
diff --git a/protocols/imap/src/main/java/org/apache/james/imap/processor/SetAnnotationProcessor.java
b/protocols/imap/src/main/java/org/apache/james/imap/processor/SetAnnotationProcessor.java
index 69223a5..774b74d 100644
--- a/protocols/imap/src/main/java/org/apache/james/imap/processor/SetAnnotationProcessor.java
+++ b/protocols/imap/src/main/java/org/apache/james/imap/processor/SetAnnotationProcessor.java
@@ -70,7 +70,7 @@ public class SetAnnotationProcessor extends AbstractMailboxProcessor<SetAnnotati
             session.getLog().info(command.getName() + " failed for mailbox " + mailboxName,
e);
             no(command, tag, responder, new HumanReadableText(HumanReadableText.MAILBOX_ANNOTATION_KEY,
e.getMessage()));
         } catch (MailboxException e) {
-            session.getLog().info(command.getName() + " failed for mailbox " + mailboxName,
e);
+            session.getLog().error(command.getName() + " failed for mailbox " + mailboxName,
e);
             no(command, tag, responder, HumanReadableText.GENERIC_FAILURE_DURING_PROCESSING);
         }
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/0ddf44bf/protocols/imap/src/main/java/org/apache/james/imap/processor/StatusProcessor.java
----------------------------------------------------------------------
diff --git a/protocols/imap/src/main/java/org/apache/james/imap/processor/StatusProcessor.java
b/protocols/imap/src/main/java/org/apache/james/imap/processor/StatusProcessor.java
index 3d806c4..8b10e8c 100644
--- a/protocols/imap/src/main/java/org/apache/james/imap/processor/StatusProcessor.java
+++ b/protocols/imap/src/main/java/org/apache/james/imap/processor/StatusProcessor.java
@@ -91,9 +91,7 @@ public class StatusProcessor extends AbstractMailboxProcessor<StatusRequest>
{
             okComplete(command, tag, responder);
 
         } catch (MailboxException e) {
-            if (session.getLog().isInfoEnabled()) {
-                session.getLog().info("Status failed for mailbox " + mailboxPath, e);
-            }
+            session.getLog().error("Status failed for mailbox " + mailboxPath, e);
             no(command, tag, responder, HumanReadableText.SEARCH_FAILED);
         }
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/0ddf44bf/protocols/imap/src/main/java/org/apache/james/imap/processor/StoreProcessor.java
----------------------------------------------------------------------
diff --git a/protocols/imap/src/main/java/org/apache/james/imap/processor/StoreProcessor.java
b/protocols/imap/src/main/java/org/apache/james/imap/processor/StoreProcessor.java
index 4919cab..d9e213b 100644
--- a/protocols/imap/src/main/java/org/apache/james/imap/processor/StoreProcessor.java
+++ b/protocols/imap/src/main/java/org/apache/james/imap/processor/StoreProcessor.java
@@ -57,6 +57,8 @@ import org.apache.james.mailbox.model.MessageResult;
 import org.apache.james.mailbox.model.MessageResultIterator;
 import org.apache.james.metrics.api.MetricFactory;
 
+import com.google.common.collect.ImmutableList;
+
 public class StoreProcessor extends AbstractMailboxProcessor<StoreRequest> {
 
     /**
@@ -210,13 +212,11 @@ public class StoreProcessor extends AbstractMailboxProcessor<StoreRequest>
{
             }
         } catch (MessageRangeException e) {
             if (session.getLog().isDebugEnabled()) {
-                session.getLog().debug("Store failed for mailbox " + session.getSelected().getPath()
+ " because of an invalid sequence-set " + idSet.toString(), e); 
+                session.getLog().debug("Store failed for mailbox " + session.getSelected().getPath()
+ " because of an invalid sequence-set " + ImmutableList.copyOf(idSet), e);
             }
             taggedBad(imapCommand, tag, responder, HumanReadableText.INVALID_MESSAGESET);
         } catch (MailboxException e) {
-            if (session.getLog().isInfoEnabled()) {
-                session.getLog().info("Store failed for mailbox " + session.getSelected().getPath(),
e);
-            }
+            session.getLog().error("Store failed for mailbox " + session.getSelected().getPath()
+ " and sequence-set " + ImmutableList.copyOf(idSet), e);
             no(imapCommand, tag, responder, HumanReadableText.SAVE_FAILED);
         }
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/0ddf44bf/protocols/imap/src/main/java/org/apache/james/imap/processor/SystemMessageProcessor.java
----------------------------------------------------------------------
diff --git a/protocols/imap/src/main/java/org/apache/james/imap/processor/SystemMessageProcessor.java
b/protocols/imap/src/main/java/org/apache/james/imap/processor/SystemMessageProcessor.java
index 9f3db77..07f881c 100644
--- a/protocols/imap/src/main/java/org/apache/james/imap/processor/SystemMessageProcessor.java
+++ b/protocols/imap/src/main/java/org/apache/james/imap/processor/SystemMessageProcessor.java
@@ -49,13 +49,11 @@ public class SystemMessageProcessor extends AbstractChainedProcessor<SystemMessa
                 forceLogout(session);
                 break;
             default:
+                session.getLog().info("Unknown system message " + message);
                 break;
             }
         } catch (MailboxException e) {
-            final Logger log = session.getLog();
-            if (log.isDebugEnabled()) {
-                log.debug("Cannot force logout", e);
-            }
+            session.getLog().error("Cannot force logout", e);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/james-project/blob/0ddf44bf/protocols/imap/src/main/java/org/apache/james/imap/processor/base/SelectedMailboxImpl.java
----------------------------------------------------------------------
diff --git a/protocols/imap/src/main/java/org/apache/james/imap/processor/base/SelectedMailboxImpl.java
b/protocols/imap/src/main/java/org/apache/james/imap/processor/base/SelectedMailboxImpl.java
index d56c6ef..103369d 100644
--- a/protocols/imap/src/main/java/org/apache/james/imap/processor/base/SelectedMailboxImpl.java
+++ b/protocols/imap/src/main/java/org/apache/james/imap/processor/base/SelectedMailboxImpl.java
@@ -121,9 +121,7 @@ public class SelectedMailboxImpl implements SelectedMailbox, MailboxListener{
         try {
             mailboxManager.removeListener(path, this, mailboxSession);
         } catch (MailboxException e) {
-            if (session.getLog().isInfoEnabled()) {
-                session.getLog().info("Unable to remove listener " + this + " from mailbox
while closing it", e);
-            }
+            session.getLog().error("Unable to remove listener " + this + " from mailbox while
closing it", e);
         }
         
         uidMsnConverter.clear();

http://git-wip-us.apache.org/repos/asf/james-project/blob/0ddf44bf/protocols/imap/src/main/java/org/apache/james/imap/processor/fetch/ContentBodyElement.java
----------------------------------------------------------------------
diff --git a/protocols/imap/src/main/java/org/apache/james/imap/processor/fetch/ContentBodyElement.java
b/protocols/imap/src/main/java/org/apache/james/imap/processor/fetch/ContentBodyElement.java
index fef9c65..5d87729 100644
--- a/protocols/imap/src/main/java/org/apache/james/imap/processor/fetch/ContentBodyElement.java
+++ b/protocols/imap/src/main/java/org/apache/james/imap/processor/fetch/ContentBodyElement.java
@@ -55,7 +55,7 @@ class ContentBodyElement implements BodyElement {
         try {
             return content.size();
         } catch (MailboxException e) {
-            throw new IOException("Unable to get size for body element",e);
+            throw new IOException("Unable to get size for body element", e);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/james-project/blob/0ddf44bf/protocols/imap/src/main/java/org/apache/james/imap/processor/fetch/FetchProcessor.java
----------------------------------------------------------------------
diff --git a/protocols/imap/src/main/java/org/apache/james/imap/processor/fetch/FetchProcessor.java
b/protocols/imap/src/main/java/org/apache/james/imap/processor/fetch/FetchProcessor.java
index 6072e15..a02fdd1 100644
--- a/protocols/imap/src/main/java/org/apache/james/imap/processor/fetch/FetchProcessor.java
+++ b/protocols/imap/src/main/java/org/apache/james/imap/processor/fetch/FetchProcessor.java
@@ -51,6 +51,8 @@ import org.apache.james.mailbox.model.MessageResult.MimePath;
 import org.apache.james.mailbox.model.MessageResultIterator;
 import org.apache.james.metrics.api.MetricFactory;
 
+import com.google.common.collect.ImmutableList;
+
 public class FetchProcessor extends AbstractMailboxProcessor<FetchRequest> {
 
     public FetchProcessor(ImapProcessor next, MailboxManager mailboxManager, StatusResponseFactory
factory,
@@ -127,13 +129,11 @@ public class FetchProcessor extends AbstractMailboxProcessor<FetchRequest>
{
             okComplete(command, tag, responder);
         } catch (MessageRangeException e) {
             if (session.getLog().isDebugEnabled()) {
-                session.getLog().debug("Fetch failed for mailbox " + session.getSelected().getPath()
+ " because of invalid sequence-set " + idSet.toString(), e);
+                session.getLog().debug("Fetch failed for mailbox " + session.getSelected().getPath()
+ " because of invalid sequence-set " + ImmutableList.copyOf(idSet), e);
             }
             taggedBad(command, tag, responder, HumanReadableText.INVALID_MESSAGESET);
         } catch (MailboxException e) {
-            if (session.getLog().isInfoEnabled()) {
-                session.getLog().info("Fetch failed for mailbox " + session.getSelected().getPath()
+ " and sequence-set " + idSet.toString(), e);
-            }
+            session.getLog().error("Fetch failed for mailbox " + session.getSelected().getPath()
+ " and sequence-set " + ImmutableList.copyOf(idSet), e);
             no(command, tag, responder, HumanReadableText.SEARCH_FAILED);
         }
     }
@@ -181,9 +181,7 @@ public class FetchProcessor extends AbstractMailboxProcessor<FetchRequest>
{
                     // So we just skip it 
                     //
                     // See IMAP-347
-                    if (session.getLog().isDebugEnabled()) {
-                        session.getLog().debug("Unable to fetch message with uid " + result.getUid()
+ ", so skip it", e);
-                    }
+                    session.getLog().error("Unable to fetch message with uid " + result.getUid()
+ ", so skip it", e);
                 }
             }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message