james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nor...@apache.org
Subject svn commit: r1075970 - in /james/imap/trunk: ./ api/ api/src/main/java/org/apache/james/imap/api/process/ message/ message/src/main/java/org/apache/james/imap/decode/main/ message/src/main/java/org/apache/james/imap/decode/parser/ message/src/main/java...
Date Tue, 01 Mar 2011 18:30:43 GMT
Author: norman
Date: Tue Mar  1 18:30:41 2011
New Revision: 1075970

URL: http://svn.apache.org/viewvc?rev=1075970&view=rev
Log:
Replace commons-logging with slf4j. Thanks to Felix Knecht for the patch. See IMAP-264 and JAMES-1149

Modified:
    james/imap/trunk/api/pom.xml
    james/imap/trunk/api/src/main/java/org/apache/james/imap/api/process/ImapSession.java
    james/imap/trunk/message/pom.xml
    james/imap/trunk/message/src/main/java/org/apache/james/imap/decode/main/DefaultImapDecoder.java
    james/imap/trunk/message/src/main/java/org/apache/james/imap/decode/parser/AppendCommandParser.java
    james/imap/trunk/message/src/main/java/org/apache/james/imap/decode/parser/CheckCommandParser.java
    james/imap/trunk/message/src/main/java/org/apache/james/imap/decode/parser/StartTLSCommandParser.java
    james/imap/trunk/message/src/main/java/org/apache/james/imap/encode/FetchResponseEncoder.java
    james/imap/trunk/message/src/main/java/org/apache/james/imap/encode/base/EndImapEncoder.java
    james/imap/trunk/message/src/main/java/org/apache/james/imap/main/AbstractImapRequestHandler.java
    james/imap/trunk/message/src/main/java/org/apache/james/imap/main/ContextualLog.java
    james/imap/trunk/message/src/main/java/org/apache/james/imap/main/ImapRequestStreamHandler.java
    james/imap/trunk/message/src/test/java/org/apache/james/imap/decode/parser/MockLogger.java
    james/imap/trunk/message/src/test/java/org/apache/james/imap/encode/FakeImapSession.java
    james/imap/trunk/pom.xml
    james/imap/trunk/processor/pom.xml
    james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/AbstractMailboxProcessor.java
    james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/AppendProcessor.java
    james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/StatusProcessor.java
    james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/SystemMessageProcessor.java
    james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/base/UnknownRequestProcessor.java
    james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/fetch/EnvelopeBuilder.java
    james/imap/trunk/processor/src/test/java/org/apache/james/imap/processor/base/MailboxEventAnalyserTest.java

Modified: james/imap/trunk/api/pom.xml
URL: http://svn.apache.org/viewvc/james/imap/trunk/api/pom.xml?rev=1075970&r1=1075969&r2=1075970&view=diff
==============================================================================
--- james/imap/trunk/api/pom.xml (original)
+++ james/imap/trunk/api/pom.xml Tue Mar  1 18:30:41 2011
@@ -39,8 +39,8 @@
     </dependency>
     
     <dependency>
-      <groupId>commons-logging</groupId>
-      <artifactId>commons-logging</artifactId>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-api</artifactId>
     </dependency>
     <dependency>
       <groupId>junit</groupId>

Modified: james/imap/trunk/api/src/main/java/org/apache/james/imap/api/process/ImapSession.java
URL: http://svn.apache.org/viewvc/james/imap/trunk/api/src/main/java/org/apache/james/imap/api/process/ImapSession.java?rev=1075970&r1=1075969&r2=1075970&view=diff
==============================================================================
--- james/imap/trunk/api/src/main/java/org/apache/james/imap/api/process/ImapSession.java (original)
+++ james/imap/trunk/api/src/main/java/org/apache/james/imap/api/process/ImapSession.java Tue Mar  1 18:30:41 2011
@@ -19,8 +19,8 @@
 
 package org.apache.james.imap.api.process;
 
-import org.apache.commons.logging.Log;
 import org.apache.james.imap.api.ImapSessionState;
+import org.slf4j.Logger;
 
 /**
  * Encapsulates all state held for an ongoing Imap session, which commences when
@@ -39,7 +39,7 @@ public interface ImapSession {
      * Using this log allows context information to be associated.
      * @return context sensitive log, not null
      */
-    Log getLog();
+    Logger getLog();
 
     /**
      * Logs out the session. Marks the connection for closure;

Modified: james/imap/trunk/message/pom.xml
URL: http://svn.apache.org/viewvc/james/imap/trunk/message/pom.xml?rev=1075970&r1=1075969&r2=1075970&view=diff
==============================================================================
--- james/imap/trunk/message/pom.xml (original)
+++ james/imap/trunk/message/pom.xml Tue Mar  1 18:30:41 2011
@@ -57,8 +57,8 @@
       <artifactId>${javax.mail.artifactId}</artifactId>
     </dependency>
     <dependency>
-      <groupId>commons-logging</groupId>
-      <artifactId>commons-logging</artifactId>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-api</artifactId>
     </dependency>
     <dependency>
       <groupId>commons-lang</groupId>

Modified: james/imap/trunk/message/src/main/java/org/apache/james/imap/decode/main/DefaultImapDecoder.java
URL: http://svn.apache.org/viewvc/james/imap/trunk/message/src/main/java/org/apache/james/imap/decode/main/DefaultImapDecoder.java?rev=1075970&r1=1075969&r2=1075970&view=diff
==============================================================================
--- james/imap/trunk/message/src/main/java/org/apache/james/imap/decode/main/DefaultImapDecoder.java (original)
+++ james/imap/trunk/message/src/main/java/org/apache/james/imap/decode/main/DefaultImapDecoder.java Tue Mar  1 18:30:41 2011
@@ -18,7 +18,6 @@
  ****************************************************************/
 package org.apache.james.imap.decode.main;
 
-import org.apache.commons.logging.Log;
 import org.apache.james.imap.api.ImapMessage;
 import org.apache.james.imap.api.ImapSessionState;
 import org.apache.james.imap.api.display.HumanReadableText;
@@ -29,6 +28,7 @@ import org.apache.james.imap.decode.Imap
 import org.apache.james.imap.decode.ImapDecoder;
 import org.apache.james.imap.decode.ImapRequestLineReader;
 import org.apache.james.imap.decode.DecodingException;
+import org.slf4j.Logger;
 
 /**
  * {@link ImapDecoder} implementation which parse the data via lookup the right {@link ImapCommandParser} via an {@link ImapCommandParserFactory}. The 
@@ -64,7 +64,7 @@ public class DefaultImapDecoder implemen
      */
     public ImapMessage decode(ImapRequestLineReader request, ImapSession session) {
         ImapMessage message;
-        final Log logger = session.getLog();
+        final Logger logger = session.getLog();
 
         try {
             final String tag = request.tag();

Modified: james/imap/trunk/message/src/main/java/org/apache/james/imap/decode/parser/AppendCommandParser.java
URL: http://svn.apache.org/viewvc/james/imap/trunk/message/src/main/java/org/apache/james/imap/decode/parser/AppendCommandParser.java?rev=1075970&r1=1075969&r2=1075970&view=diff
==============================================================================
--- james/imap/trunk/message/src/main/java/org/apache/james/imap/decode/parser/AppendCommandParser.java (original)
+++ james/imap/trunk/message/src/main/java/org/apache/james/imap/decode/parser/AppendCommandParser.java Tue Mar  1 18:30:41 2011
@@ -73,7 +73,7 @@ public class AppendCommandParser extends
 
     /*
      * (non-Javadoc)
-     * @see org.apache.james.imap.decode.base.AbstractImapCommandParser#decode(org.apache.james.imap.api.ImapCommand, org.apache.james.imap.decode.ImapRequestLineReader, java.lang.String, org.apache.commons.logging.Log, org.apache.james.imap.api.process.ImapSession)
+     * @see org.apache.james.imap.decode.base.AbstractImapCommandParser#decode(org.apache.james.imap.api.ImapCommand, org.apache.james.imap.decode.ImapRequestLineReader, java.lang.String, org.apache.james.imap.api.process.ImapSession)
      */
     protected ImapMessage decode(ImapCommand command,
             ImapRequestLineReader request, String tag, ImapSession session) throws DecodingException {

Modified: james/imap/trunk/message/src/main/java/org/apache/james/imap/decode/parser/CheckCommandParser.java
URL: http://svn.apache.org/viewvc/james/imap/trunk/message/src/main/java/org/apache/james/imap/decode/parser/CheckCommandParser.java?rev=1075970&r1=1075969&r2=1075970&view=diff
==============================================================================
--- james/imap/trunk/message/src/main/java/org/apache/james/imap/decode/parser/CheckCommandParser.java (original)
+++ james/imap/trunk/message/src/main/java/org/apache/james/imap/decode/parser/CheckCommandParser.java Tue Mar  1 18:30:41 2011
@@ -40,7 +40,7 @@ public class CheckCommandParser extends 
 
     /*
      * (non-Javadoc)
-     * @see org.apache.james.imap.decode.base.AbstractImapCommandParser#decode(org.apache.james.imap.api.ImapCommand, org.apache.james.imap.decode.ImapRequestLineReader, java.lang.String, org.apache.commons.logging.Log, org.apache.james.imap.api.process.ImapSession)
+     * @see org.apache.james.imap.decode.base.AbstractImapCommandParser#decode(org.apache.james.imap.api.ImapCommand, org.apache.james.imap.decode.ImapRequestLineReader, java.lang.String, org.apache.james.imap.api.process.ImapSession)
      */
     protected ImapMessage decode(ImapCommand command,
             ImapRequestLineReader request, String tag, ImapSession session) throws DecodingException {

Modified: james/imap/trunk/message/src/main/java/org/apache/james/imap/decode/parser/StartTLSCommandParser.java
URL: http://svn.apache.org/viewvc/james/imap/trunk/message/src/main/java/org/apache/james/imap/decode/parser/StartTLSCommandParser.java?rev=1075970&r1=1075969&r2=1075970&view=diff
==============================================================================
--- james/imap/trunk/message/src/main/java/org/apache/james/imap/decode/parser/StartTLSCommandParser.java (original)
+++ james/imap/trunk/message/src/main/java/org/apache/james/imap/decode/parser/StartTLSCommandParser.java Tue Mar  1 18:30:41 2011
@@ -39,7 +39,7 @@ public class StartTLSCommandParser exten
 
     /*
      * (non-Javadoc)
-     * @see org.apache.james.imap.decode.base.AbstractImapCommandParser#decode(org.apache.james.imap.api.ImapCommand, org.apache.james.imap.decode.ImapRequestLineReader, java.lang.String, org.apache.commons.logging.Log, org.apache.james.imap.api.process.ImapSession)
+     * @see org.apache.james.imap.decode.base.AbstractImapCommandParser#decode(org.apache.james.imap.api.ImapCommand, org.apache.james.imap.decode.ImapRequestLineReader, java.lang.String, org.apache.james.imap.api.process.ImapSession)
      */
     protected ImapMessage decode(ImapCommand command, ImapRequestLineReader request, String tag, ImapSession session) throws DecodingException {
         request.eol();

Modified: james/imap/trunk/message/src/main/java/org/apache/james/imap/encode/FetchResponseEncoder.java
URL: http://svn.apache.org/viewvc/james/imap/trunk/message/src/main/java/org/apache/james/imap/encode/FetchResponseEncoder.java?rev=1075970&r1=1075969&r2=1075970&view=diff
==============================================================================
--- james/imap/trunk/message/src/main/java/org/apache/james/imap/encode/FetchResponseEncoder.java (original)
+++ james/imap/trunk/message/src/main/java/org/apache/james/imap/encode/FetchResponseEncoder.java Tue Mar  1 18:30:41 2011
@@ -30,13 +30,13 @@ import java.util.TreeSet;
 
 import javax.mail.Flags;
 
-import org.apache.commons.logging.Log;
 import org.apache.james.imap.api.ImapConstants;
 import org.apache.james.imap.api.ImapMessage;
 import org.apache.james.imap.api.process.ImapSession;
 import org.apache.james.imap.encode.base.AbstractChainedImapEncoder;
 import org.apache.james.imap.message.response.FetchResponse;
 import org.apache.james.imap.message.response.FetchResponse.Structure;
+import org.slf4j.Logger;
 
 public class FetchResponseEncoder extends AbstractChainedImapEncoder {
 
@@ -196,7 +196,7 @@ public class FetchResponseEncoder extend
                 final String name = iter.next();
                 final String value = params.get(name);
                 if (value == null) {
-                    final Log logger = session.getLog();
+                    final Logger logger = session.getLog();
                     logger.warn("Disposition parameter name has no value.");
                     if (logger.isDebugEnabled()) {
                         logger.debug("Disposition parameter " + name

Modified: james/imap/trunk/message/src/main/java/org/apache/james/imap/encode/base/EndImapEncoder.java
URL: http://svn.apache.org/viewvc/james/imap/trunk/message/src/main/java/org/apache/james/imap/encode/base/EndImapEncoder.java?rev=1075970&r1=1075969&r2=1075970&view=diff
==============================================================================
--- james/imap/trunk/message/src/main/java/org/apache/james/imap/encode/base/EndImapEncoder.java (original)
+++ james/imap/trunk/message/src/main/java/org/apache/james/imap/encode/base/EndImapEncoder.java Tue Mar  1 18:30:41 2011
@@ -21,11 +21,11 @@ package org.apache.james.imap.encode.bas
 
 import java.io.IOException;
 
-import org.apache.commons.logging.Log;
 import org.apache.james.imap.api.ImapMessage;
 import org.apache.james.imap.api.process.ImapSession;
 import org.apache.james.imap.encode.ImapEncoder;
 import org.apache.james.imap.encode.ImapResponseComposer;
+import org.slf4j.Logger;
 
 /**
  * {@link ImapEncoder} which should get added to the end of the encoder chain. It will handle the response
@@ -41,7 +41,7 @@ public class EndImapEncoder implements I
      */
     public void encode(ImapMessage message, ImapResponseComposer composer, ImapSession session)
             throws IOException {
-        final Log logger = session.getLog();
+        final Logger logger = session.getLog();
         logger.warn("Unknown message");
         if (logger.isDebugEnabled()) {
             logger.debug("Chain end reached for " + message);

Modified: james/imap/trunk/message/src/main/java/org/apache/james/imap/main/AbstractImapRequestHandler.java
URL: http://svn.apache.org/viewvc/james/imap/trunk/message/src/main/java/org/apache/james/imap/main/AbstractImapRequestHandler.java?rev=1075970&r1=1075969&r2=1075970&view=diff
==============================================================================
--- james/imap/trunk/message/src/main/java/org/apache/james/imap/main/AbstractImapRequestHandler.java (original)
+++ james/imap/trunk/message/src/main/java/org/apache/james/imap/main/AbstractImapRequestHandler.java Tue Mar  1 18:30:41 2011
@@ -21,7 +21,6 @@ package org.apache.james.imap.main;
 
 import java.io.IOException;
 
-import org.apache.commons.logging.Log;
 import org.apache.james.imap.api.ImapMessage;
 import org.apache.james.imap.api.message.response.ImapResponseMessage;
 import org.apache.james.imap.api.process.ImapProcessor;
@@ -32,6 +31,7 @@ import org.apache.james.imap.decode.Imap
 import org.apache.james.imap.decode.ImapRequestLineReader;
 import org.apache.james.imap.encode.ImapEncoder;
 import org.apache.james.imap.encode.ImapResponseComposer;
+import org.slf4j.Logger;
 
 public abstract class AbstractImapRequestHandler {
 
@@ -70,7 +70,7 @@ public abstract class AbstractImapReques
             result = true;
         } else {
             result = false;
-            final Log logger = session.getLog();
+            final Logger logger = session.getLog();
             logger.info(failure.getMessage());
             if (logger.isDebugEnabled()) {
                 logger.debug("Failed to write " + message, failure);

Modified: james/imap/trunk/message/src/main/java/org/apache/james/imap/main/ContextualLog.java
URL: http://svn.apache.org/viewvc/james/imap/trunk/message/src/main/java/org/apache/james/imap/main/ContextualLog.java?rev=1075970&r1=1075969&r2=1075970&view=diff
==============================================================================
--- james/imap/trunk/message/src/main/java/org/apache/james/imap/main/ContextualLog.java (original)
+++ james/imap/trunk/message/src/main/java/org/apache/james/imap/main/ContextualLog.java Tue Mar  1 18:30:41 2011
@@ -18,98 +18,80 @@
  ****************************************************************/
 package org.apache.james.imap.main;
 
-import org.apache.commons.logging.Log;
+import org.slf4j.Logger;
+import org.slf4j.Marker;
 
 /**
  * Decorates a log adding contextual information.
  */
-public class ContextualLog implements Log {
+public class ContextualLog implements Logger {
     
     private final Object context;
-    private final Log decoratedLog;
+    private final Logger decoratedLog;
     
-    public ContextualLog(final Object context, final Log decoratedLog) {
+    public ContextualLog(final Object context, final Logger decoratedLog) {
         super();
         this.context = context;
         this.decoratedLog = decoratedLog;
     }
 
-    public void debug(Object message) {
+
+    public void debug(String message) {
         if (isDebugEnabled()) {
             if (context == null) {
                 decoratedLog.debug(message);
             } else {
-                decoratedLog.debug(new Message(context, message));
+                decoratedLog.debug(new Message(context, message).toString());
             }
         }
     }
 
-    public void debug(Object message, Throwable t) {
+    public void debug(String message, Throwable t) {
         if (isDebugEnabled()) {
             if (context == null) {
                 decoratedLog.debug(message, t);
             } else {
-                decoratedLog.debug(new Message(context, message), t);
+                decoratedLog.debug(new Message(context, message).toString(), t);
             }
         }
     }
 
-    public void error(Object message) {
+    public void error(String message) {
         if (isErrorEnabled()) {
             if (context == null) {
                 decoratedLog.error(message);
             } else {
-                decoratedLog.error(new Message(context, message));
+                decoratedLog.error(new Message(context, message).toString());
             }
         }
     }
 
-    public void error(Object message, Throwable t) {
+    public void error(String message, Throwable t) {
         if (isErrorEnabled()) {
             if (context == null) {
                 decoratedLog.error(message, t);
             } else {
-                decoratedLog.error(new Message(context, message), t);
+                decoratedLog.error(new Message(context, message).toString(), t);
             }
         }
     }
 
-    public void fatal(Object message) {
-        if (isFatalEnabled()) {
-            if (context == null) {
-                decoratedLog.fatal(message);
-            } else {
-                decoratedLog.fatal(new Message(context, message));
-            }
-        }
-    }
-
-    public void fatal(Object message, Throwable t) {
-        if (isFatalEnabled()) {
-            if (context == null) {
-                decoratedLog.fatal(message, t);
-            } else {
-                decoratedLog.fatal(new Message(context, message), t);
-            }
-        }
-    }
-
-    public void info(Object message) {
+    public void info(String message) {
         if (isInfoEnabled()) {
             if (context == null) {
                 decoratedLog.info(message);
             } else {
-                decoratedLog.info(new Message(context, message));
+                decoratedLog.info(new Message(context, message).toString());
             }
         }
     }
 
-    public void info(Object message, Throwable t) {
+    public void info(String message, Throwable t) {
         if (isInfoEnabled()) {
             if (context == null) {
                 decoratedLog.info(message, t);
             } else {
-                decoratedLog.info(new Message(context, message), t);
+                decoratedLog.info(new Message(context, message).toString(), t);
             }
         }
     }
@@ -122,10 +104,6 @@ public class ContextualLog implements Lo
         return decoratedLog.isErrorEnabled();
     }
 
-    public boolean isFatalEnabled() {
-        return decoratedLog.isFatalEnabled();
-    }
-
     public boolean isInfoEnabled() {
         return decoratedLog.isInfoEnabled();
     }
@@ -138,42 +116,42 @@ public class ContextualLog implements Lo
         return decoratedLog.isWarnEnabled();
     }
 
-    public void trace(Object message) {
+    public void trace(String message) {
         if (isTraceEnabled()) {
             if (context == null) {
                 decoratedLog.trace(message);
             } else {
-                decoratedLog.trace(new Message(context, message));
+                decoratedLog.trace(new Message(context, message).toString());
             }
         }
     }
 
-    public void trace(Object message, Throwable t) {
+    public void trace(String message, Throwable t) {
         if (isTraceEnabled()) {
             if (context == null) {
                 decoratedLog.trace(message, t);
             } else {
-                decoratedLog.trace(new Message(context, message), t);
+                decoratedLog.trace(new Message(context, message).toString(), t);
             }
         }
     }
 
-    public void warn(Object message) {
+    public void warn(String message) {
         if (isWarnEnabled()) {
             if (context == null) {
                 decoratedLog.warn(message);
             } else {
-                decoratedLog.warn(new Message(context, message));
+                decoratedLog.warn(new Message(context, message).toString());
             }
         }        
     }
 
-    public void warn(Object message, Throwable t) {
+    public void warn(String message, Throwable t) {
         if (isWarnEnabled()) {
             if (context == null) {
                 decoratedLog.warn(message, t);
             } else {
-                decoratedLog.warn(new Message(context, message), t);
+                decoratedLog.warn(new Message(context, message).toString(), t);
             }
         }        
     }
@@ -220,4 +198,474 @@ public class ContextualLog implements Lo
             return context + " " + message;
         }
     }
+
+    public String getName() {
+	return decoratedLog.getName();
+    }
+
+
+    public void trace(String message, Object arg) {
+        if (isTraceEnabled()) {
+            if (context == null) {
+                decoratedLog.trace(message, arg);
+            } else {
+                decoratedLog.trace(new Message(context, message).toString(), arg);
+            }
+        }
+    }
+
+
+    public void trace(String message, Object arg1, Object arg2) {
+        if (isTraceEnabled()) {
+            if (context == null) {
+                decoratedLog.trace(message, arg1, arg2);
+            } else {
+                decoratedLog.trace(new Message(context, message).toString(), arg1, arg2);
+            }
+        }
+	
+    }
+
+
+    public void trace(String message, Object[] argArray) {
+        if (isTraceEnabled()) {
+            if (context == null) {
+                decoratedLog.trace(message, argArray);
+            } else {
+                decoratedLog.trace(new Message(context, message).toString(), argArray);
+            }
+        }
+    }
+
+
+    public boolean isTraceEnabled(Marker marker) {
+	return decoratedLog.isTraceEnabled(marker);
+    }
+
+
+    public void trace(Marker marker, String msg) {
+        if (isTraceEnabled(marker)) {
+            if (context == null) {
+                decoratedLog.trace(marker, msg);
+            } else {
+                decoratedLog.trace(marker, new Message(context, msg).toString());
+            }
+        }
+    }
+
+
+    public void trace(Marker marker, String message, Object arg) {
+        if (isTraceEnabled(marker)) {
+            if (context == null) {
+                decoratedLog.trace(marker, message, arg);
+            } else {
+                decoratedLog.trace(marker, new Message(context, message).toString(), arg);
+            }
+        }
+    }
+
+
+    public void trace(Marker marker, String message, Object arg1, Object arg2) {
+        if (isTraceEnabled(marker)) {
+            if (context == null) {
+                decoratedLog.trace(marker, message, arg1, arg2);
+            } else {
+                decoratedLog.trace(marker, new Message(context, message).toString(), arg1, arg2);
+            }
+        }
+    }
+
+
+    public void trace(Marker marker, String message, Object[] argArray) {
+        if (isTraceEnabled(marker)) {
+            if (context == null) {
+                decoratedLog.trace(marker, message, argArray);
+            } else {
+                decoratedLog.trace(marker, new Message(context, message).toString(), argArray);
+            }
+        }
+    }
+
+
+    public void trace(Marker marker, String msg, Throwable t) {
+        if (isTraceEnabled(marker)) {
+            if (context == null) {
+                decoratedLog.trace(marker, msg, t);
+            } else {
+                decoratedLog.trace(marker, new Message(context, msg).toString(), t);
+            }
+        }
+    }
+
+
+    public void debug(String message, Object arg) {
+        if (isDebugEnabled()) {
+            if (context == null) {
+                decoratedLog.debug(message, arg);
+            } else {
+                decoratedLog.debug(new Message(context, message).toString(), arg);
+            }
+        }
+    }
+
+
+    public void debug(String message, Object arg1, Object arg2) {
+        if (isDebugEnabled()) {
+            if (context == null) {
+                decoratedLog.debug(message, arg1, arg2);
+            } else {
+                decoratedLog.debug(new Message(context, message).toString(), arg1, arg2);
+            }
+        }
+    }
+
+
+    public void debug(String message, Object[] argArray) {
+        if (isDebugEnabled()) {
+            if (context == null) {
+                decoratedLog.debug(message, argArray);
+            } else {
+                decoratedLog.debug(new Message(context, message).toString(), argArray);
+            }
+        }
+    }
+
+
+    public boolean isDebugEnabled(Marker marker) {
+	return decoratedLog.isDebugEnabled(marker);
+    }
+
+
+    public void debug(Marker marker, String msg) {
+        if (isDebugEnabled(marker)) {
+            if (context == null) {
+                decoratedLog.debug(marker, msg);
+            } else {
+                decoratedLog.debug(marker, new Message(context, msg).toString());
+            }
+        }
+    }
+
+
+    public void debug(Marker marker, String message, Object arg) {
+        if (isDebugEnabled(marker)) {
+            if (context == null) {
+                decoratedLog.debug(marker, message, arg);
+            } else {
+                decoratedLog.debug(marker, new Message(context, message).toString(), arg);
+            }
+        }
+    }
+
+
+    public void debug(Marker marker, String message, Object arg1, Object arg2) {
+        if (isDebugEnabled(marker)) {
+            if (context == null) {
+                decoratedLog.debug(marker, message, arg1, arg2);
+            } else {
+                decoratedLog.debug(new Message(context, message).toString(), arg1, arg2);
+            }
+        }
+    }
+
+
+    public void debug(Marker marker, String message, Object[] argArray) {
+        if (isDebugEnabled(marker)) {
+            if (context == null) {
+                decoratedLog.debug(marker, message, argArray);
+            } else {
+                decoratedLog.debug(marker, new Message(context, message).toString(), argArray);
+            }
+        }
+    }
+
+
+    public void debug(Marker marker, String msg, Throwable t) {
+        if (isDebugEnabled(marker)) {
+            if (context == null) {
+                decoratedLog.debug(marker, msg, t);
+            } else {
+                decoratedLog.debug(marker, new Message(context, msg).toString(), t);
+            }
+        }
+    }
+
+
+    public void info(String message, Object arg) {
+        if (isInfoEnabled()) {
+            if (context == null) {
+                decoratedLog.info(message, arg);
+            } else {
+                decoratedLog.info(new Message(context, message).toString(), arg);
+            }
+        }
+    }
+
+
+    public void info(String message, Object arg1, Object arg2) {
+        if (isInfoEnabled()) {
+            if (context == null) {
+                decoratedLog.info(message, arg1, arg2);
+            } else {
+                decoratedLog.info(new Message(context, message).toString(), arg1, arg2);
+            }
+        }
+    }
+
+
+    public void info(String message, Object[] argArray) {
+        if (isInfoEnabled()) {
+            if (context == null) {
+                decoratedLog.info(message, argArray);
+            } else {
+                decoratedLog.info(new Message(context, message).toString(), argArray);
+            }
+        }
+    }
+
+
+    public boolean isInfoEnabled(Marker marker) {
+	return decoratedLog.isInfoEnabled(marker);
+    }
+
+
+    public void info(Marker marker, String msg) {
+        if (isInfoEnabled(marker)) {
+            if (context == null) {
+                decoratedLog.info(marker, msg);
+            } else {
+                decoratedLog.info(marker, new Message(context, msg).toString());
+            }
+        }
+    }
+
+
+    public void info(Marker marker, String message, Object arg) {
+        if (isInfoEnabled(marker)) {
+            if (context == null) {
+                decoratedLog.info(marker, message, arg);
+            } else {
+                decoratedLog.info(marker, new Message(context, message).toString(), arg);
+            }
+        }
+    }
+
+
+    public void info(Marker marker, String message, Object arg1, Object arg2) {
+        if (isInfoEnabled(marker)) {
+            if (context == null) {
+                decoratedLog.info(marker, message, arg1, arg2);
+            } else {
+                decoratedLog.info(marker, new Message(context, message).toString(), arg1, arg2);
+            }
+        }
+    }
+
+
+    public void info(Marker marker, String message, Object[] argArray) {
+        if (isInfoEnabled(marker)) {
+            if (context == null) {
+                decoratedLog.info(marker, message, argArray);
+            } else {
+                decoratedLog.info(marker, new Message(context, message).toString(), argArray);
+            }
+        }
+    }
+
+
+    public void info(Marker marker, String msg, Throwable t) {
+        if (isInfoEnabled(marker)) {
+            if (context == null) {
+                decoratedLog.info(marker, msg, t);
+            } else {
+                decoratedLog.info(marker, new Message(context, msg).toString(), t);
+            }
+        }
+    }
+
+
+    public void warn(String message, Object arg) {
+        if (isWarnEnabled()) {
+            if (context == null) {
+                decoratedLog.warn(message, arg);
+            } else {
+                decoratedLog.warn(new Message(context, message).toString(), arg);
+            }
+        }        
+    }
+
+
+    public void warn(String message, Object[] argArray) {
+        if (isWarnEnabled()) {
+            if (context == null) {
+                decoratedLog.warn(message, argArray);
+            } else {
+                decoratedLog.warn(new Message(context, message).toString(), argArray);
+            }
+        }        
+    }
+
+
+    public void warn(String message, Object arg1, Object arg2) {
+        if (isWarnEnabled()) {
+            if (context == null) {
+                decoratedLog.warn(message, arg1, arg2);
+            } else {
+                decoratedLog.warn(new Message(context, message).toString(), arg1, arg2);
+            }
+        }        
+    }
+
+
+    public boolean isWarnEnabled(Marker marker) {
+	return decoratedLog.isWarnEnabled(marker);
+    }
+
+
+    public void warn(Marker marker, String msg) {
+        if (isWarnEnabled(marker)) {
+            if (context == null) {
+                decoratedLog.warn(marker, msg);
+            } else {
+                decoratedLog.warn(marker, new Message(context, msg).toString());
+            }
+        }        
+    }
+
+
+    public void warn(Marker marker, String message, Object arg) {
+        if (isWarnEnabled(marker)) {
+            if (context == null) {
+                decoratedLog.warn(marker, message, arg);
+            } else {
+                decoratedLog.warn(marker, new Message(context, message).toString(), arg);
+            }
+        }        
+    }
+
+
+    public void warn(Marker marker, String message, Object arg1, Object arg2) {
+        if (isWarnEnabled(marker)) {
+            if (context == null) {
+                decoratedLog.warn(marker, message, arg1, arg2);
+            } else {
+                decoratedLog.warn(marker, new Message(context, message).toString(), arg1, arg2);
+            }
+        }        
+    }
+
+
+    public void warn(Marker marker, String message, Object[] argArray) {
+        if (isWarnEnabled(marker)) {
+            if (context == null) {
+                decoratedLog.warn(marker, message, argArray);
+            } else {
+                decoratedLog.warn(marker, new Message(context, message).toString(), argArray);
+            }
+        }        
+    }
+
+
+    public void warn(Marker marker, String msg, Throwable t) {
+        if (isWarnEnabled(marker)) {
+            if (context == null) {
+                decoratedLog.warn(marker, msg, t);
+            } else {
+                decoratedLog.warn(marker, new Message(context, msg).toString(), t);
+            }
+        }        
+    }
+
+
+    public void error(String message, Object arg) {
+        if (isErrorEnabled()) {
+            if (context == null) {
+                decoratedLog.warn(message, arg);
+            } else {
+                decoratedLog.warn(new Message(context, message).toString(), arg);
+            }
+        }        
+    }
+
+
+    public void error(String message, Object arg1, Object arg2) {
+        if (isErrorEnabled()) {
+            if (context == null) {
+                decoratedLog.warn(message, arg1, arg2);
+            } else {
+                decoratedLog.warn(new Message(context, message).toString(), arg1, arg2);
+            }
+        }        
+    }
+
+
+    public void error(String message, Object[] argArray) {
+        if (isErrorEnabled()) {
+            if (context == null) {
+                decoratedLog.warn(message, argArray);
+            } else {
+                decoratedLog.warn(new Message(context, message).toString(), argArray);
+            }
+        }        
+    }
+
+
+    public boolean isErrorEnabled(Marker marker) {
+	return decoratedLog.isErrorEnabled(marker);
+    }
+
+
+    public void error(Marker marker, String msg) {
+        if (isErrorEnabled(marker)) {
+            if (context == null) {
+                decoratedLog.warn(msg);
+            } else {
+                decoratedLog.warn(marker, new Message(context, msg).toString());
+            }
+        }        
+    }
+
+
+    public void error(Marker marker, String message, Object arg) {
+        if (isErrorEnabled(marker)) {
+            if (context == null) {
+                decoratedLog.warn(marker, message, arg);
+            } else {
+                decoratedLog.warn(marker, new Message(context, message).toString(), arg);
+            }
+        }        
+    }
+
+
+    public void error(Marker marker, String message, Object arg1, Object arg2) {
+        if (isErrorEnabled(marker)) {
+            if (context == null) {
+                decoratedLog.warn(marker, message, arg1, arg2);
+            } else {
+                decoratedLog.warn(marker, new Message(context, message).toString(), arg1, arg2);
+            }
+        }        
+    }
+
+
+    public void error(Marker marker, String message, Object[] argArray) {
+        if (isErrorEnabled(marker)) {
+            if (context == null) {
+                decoratedLog.warn(marker, message, argArray);
+            } else {
+                decoratedLog.warn(marker, new Message(context, message).toString(), argArray);
+            }
+        }        
+    }
+
+
+    public void error(Marker marker, String msg, Throwable t) {
+        if (isErrorEnabled(marker)) {
+            if (context == null) {
+                decoratedLog.warn(marker, msg, t);
+            } else {
+                decoratedLog.warn(marker, new Message(context, msg).toString(), t);
+            }
+        }        
+    }
 }

Modified: james/imap/trunk/message/src/main/java/org/apache/james/imap/main/ImapRequestStreamHandler.java
URL: http://svn.apache.org/viewvc/james/imap/trunk/message/src/main/java/org/apache/james/imap/main/ImapRequestStreamHandler.java?rev=1075970&r1=1075969&r2=1075970&view=diff
==============================================================================
--- james/imap/trunk/message/src/main/java/org/apache/james/imap/main/ImapRequestStreamHandler.java (original)
+++ james/imap/trunk/message/src/main/java/org/apache/james/imap/main/ImapRequestStreamHandler.java Tue Mar  1 18:30:41 2011
@@ -23,7 +23,6 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
 
-import org.apache.commons.logging.Log;
 import org.apache.james.imap.api.ImapSessionState;
 import org.apache.james.imap.api.process.ImapProcessor;
 import org.apache.james.imap.api.process.ImapSession;
@@ -34,6 +33,7 @@ import org.apache.james.imap.decode.Imap
 import org.apache.james.imap.encode.ImapEncoder;
 import org.apache.james.imap.encode.base.ImapResponseComposerImpl;
 import org.apache.james.imap.message.request.SystemMessage;
+import org.slf4j.Logger;
 
 /**
  * @version $Revision: 109034 $
@@ -66,7 +66,7 @@ public final class ImapRequestStreamHand
             ImapRequestLineReader request = new ImapRequestStreamLineReader(input,
                     output);
 
-            final Log logger = session.getLog();
+            final Logger logger = session.getLog();
             try {
                 request.nextChar();
             } catch (DecodingException e) {

Modified: james/imap/trunk/message/src/test/java/org/apache/james/imap/decode/parser/MockLogger.java
URL: http://svn.apache.org/viewvc/james/imap/trunk/message/src/test/java/org/apache/james/imap/decode/parser/MockLogger.java?rev=1075970&r1=1075969&r2=1075970&view=diff
==============================================================================
--- james/imap/trunk/message/src/test/java/org/apache/james/imap/decode/parser/MockLogger.java (original)
+++ james/imap/trunk/message/src/test/java/org/apache/james/imap/decode/parser/MockLogger.java Tue Mar  1 18:30:41 2011
@@ -22,78 +22,205 @@
  */
 package org.apache.james.imap.decode.parser;
 
-import org.apache.commons.logging.Log;
+import org.slf4j.Logger;
+import org.slf4j.Marker;
 
-final class MockLogger implements Log {
-    public void debug(Object arg0) {
+
+final class MockLogger implements Logger {
+
+    public void debug(Marker arg0, String arg1, Object arg2, Object arg3) {
+    }
+
+    public void debug(Marker arg0, String arg1, Object arg2) {
+    }
+
+    public void debug(Marker arg0, String arg1, Object[] arg2) {
+    }
+
+    public void debug(Marker arg0, String arg1, Throwable arg2) {
+    }
+
+    public void debug(Marker arg0, String arg1) {
+    }
+
+    public void debug(String arg0, Object arg1, Object arg2) {
+    }
+
+    public void debug(String arg0, Object arg1) {
+    }
+
+    public void debug(String arg0, Object[] arg1) {
+    }
+
+    public void debug(String arg0, Throwable arg1) {
+    }
+
+    public void debug(String arg0) {
+    }
+
+    public void error(Marker arg0, String arg1, Object arg2, Object arg3) {
+    }
+
+    public void error(Marker arg0, String arg1, Object arg2) {
+    }
+
+    public void error(Marker arg0, String arg1, Object[] arg2) {
+    }
+
+    public void error(Marker arg0, String arg1, Throwable arg2) {
+    }
+
+    public void error(Marker arg0, String arg1) {
+    }
+
+    public void error(String arg0, Object arg1, Object arg2) {
+    }
+
+    public void error(String arg0, Object arg1) {
+    }
+
+    public void error(String arg0, Object[] arg1) {
+    }
+
+    public void error(String arg0, Throwable arg1) {
+    }
+
+    public void error(String arg0) {
+    }
+
+    public String getName() {
+	// TODO Auto-generated method stub
+	return null;
     }
 
-    public void debug(Object arg0, Throwable arg1) {
+    public void info(Marker arg0, String arg1, Object arg2, Object arg3) {
     }
 
-    public void error(Object arg0) {
+    public void info(Marker arg0, String arg1, Object arg2) {
     }
 
-    public void error(Object arg0, Throwable arg1) {
+    public void info(Marker arg0, String arg1, Object[] arg2) {
     }
 
-    public void fatalError(Object arg0) {
+    public void info(Marker arg0, String arg1, Throwable arg2) {
     }
 
-    public void fatalError(Object arg0, Throwable arg1) {
+    public void info(Marker arg0, String arg1) {
     }
 
-    public void info(Object arg0) {
+    public void info(String arg0, Object arg1, Object arg2) {
     }
 
-    public void info(Object arg0, Throwable arg1) {
+    public void info(String arg0, Object arg1) {
+    }
+
+    public void info(String arg0, Object[] arg1) {
+    }
+
+    public void info(String arg0, Throwable arg1) {
+    }
+
+    public void info(String arg0) {
     }
 
     public boolean isDebugEnabled() {
-        return false;
+	return false;
+    }
+
+    public boolean isDebugEnabled(Marker arg0) {
+	return false;
     }
 
     public boolean isErrorEnabled() {
-        return false;
+	return false;
     }
 
-    public boolean isFatalErrorEnabled() {
-        return false;
+    public boolean isErrorEnabled(Marker arg0) {
+	return false;
     }
 
     public boolean isInfoEnabled() {
-        return false;
+	return false;
+    }
+
+    public boolean isInfoEnabled(Marker arg0) {
+	return false;
+    }
+
+    public boolean isTraceEnabled() {
+	return false;
+    }
+
+    public boolean isTraceEnabled(Marker arg0) {
+	return false;
     }
 
     public boolean isWarnEnabled() {
-        return false;
+	return false;
+    }
+
+    public boolean isWarnEnabled(Marker arg0) {
+	return false;
     }
 
-    public void warn(Object arg0) {
+    public void trace(Marker arg0, String arg1, Object arg2, Object arg3) {
+    }
 
+    public void trace(Marker arg0, String arg1, Object arg2) {
     }
 
-    public void warn(Object arg0, Throwable arg1) {
+    public void trace(Marker arg0, String arg1, Object[] arg2) {
+    }
 
+    public void trace(Marker arg0, String arg1, Throwable arg2) {
     }
 
-    public void fatal(Object arg0) {
+    public void trace(Marker arg0, String arg1) {
     }
 
-    public void fatal(Object arg0, Throwable arg1) {
+    public void trace(String arg0, Object arg1, Object arg2) {
     }
 
-    public boolean isFatalEnabled() {
-        return false;
+    public void trace(String arg0, Object arg1) {
     }
 
-    public boolean isTraceEnabled() {
-        return false;
+    public void trace(String arg0, Object[] arg1) {
     }
 
-    public void trace(Object arg0) {
+    public void trace(String arg0, Throwable arg1) {
     }
 
-    public void trace(Object arg0, Throwable arg1) {
+    public void trace(String arg0) {
     }
+
+    public void warn(Marker arg0, String arg1, Object arg2, Object arg3) {
+    }
+
+    public void warn(Marker arg0, String arg1, Object arg2) {
+    }
+
+    public void warn(Marker arg0, String arg1, Object[] arg2) {
+    }
+
+    public void warn(Marker arg0, String arg1, Throwable arg2) {
+    }
+
+    public void warn(Marker arg0, String arg1) {
+    }
+
+    public void warn(String arg0, Object arg1, Object arg2) {
+    }
+
+    public void warn(String arg0, Object arg1) {
+    }
+
+    public void warn(String arg0, Object[] arg1) {
+    }
+
+    public void warn(String arg0, Throwable arg1) {
+    }
+
+    public void warn(String arg0) {
+    }
+
 }
\ No newline at end of file

Modified: james/imap/trunk/message/src/test/java/org/apache/james/imap/encode/FakeImapSession.java
URL: http://svn.apache.org/viewvc/james/imap/trunk/message/src/test/java/org/apache/james/imap/encode/FakeImapSession.java?rev=1075970&r1=1075969&r2=1075970&view=diff
==============================================================================
--- james/imap/trunk/message/src/test/java/org/apache/james/imap/encode/FakeImapSession.java (original)
+++ james/imap/trunk/message/src/test/java/org/apache/james/imap/encode/FakeImapSession.java Tue Mar  1 18:30:41 2011
@@ -21,16 +21,16 @@ package org.apache.james.imap.encode;
 import java.util.Map;
 import java.util.concurrent.ConcurrentHashMap;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.james.imap.api.ImapSessionState;
 import org.apache.james.imap.api.process.ImapLineHandler;
 import org.apache.james.imap.api.process.ImapSession;
 import org.apache.james.imap.api.process.SelectedMailbox;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class FakeImapSession implements ImapSession {
     
-    private static final Log LOG = LogFactory.getLog(FakeImapSession.class);
+    private static final Logger LOG = LoggerFactory.getLogger(FakeImapSession.class);
     
     private ImapSessionState state = ImapSessionState.NON_AUTHENTICATED;
 
@@ -90,7 +90,7 @@ public class FakeImapSession implements 
         }
     }
 
-    public Log getLog() {
+    public Logger getLog() {
         return LOG;
     }
 

Modified: james/imap/trunk/pom.xml
URL: http://svn.apache.org/viewvc/james/imap/trunk/pom.xml?rev=1075970&r1=1075969&r2=1075970&view=diff
==============================================================================
--- james/imap/trunk/pom.xml (original)
+++ james/imap/trunk/pom.xml Tue Mar  1 18:30:41 2011
@@ -221,6 +221,24 @@
         </exclusions>
       </dependency>
 
+      <!-- 
+        START Logging
+      -->
+      <dependency>
+        <groupId>org.slf4j</groupId>
+        <artifactId>slf4j-api</artifactId>
+        <version>1.6.1</version>
+      </dependency>
+      <dependency>
+        <groupId>org.slf4j</groupId>
+        <artifactId>slf4j-simple</artifactId>
+        <version>1.6.1</version>
+        <scope>test</scope>
+      </dependency>
+      <!-- 
+        END Logging
+      -->
+       
       <!--
         Start Commons
       -->
@@ -230,29 +248,6 @@
         <version>${version.commons-collections}</version>
       </dependency>
       <dependency>
-        <groupId>commons-logging</groupId>
-        <artifactId>commons-logging</artifactId>
-        <version>${version.commons-logging}</version>
-        <exclusions>
-          <exclusion>
-            <artifactId>logkit</artifactId>
-            <groupId>logkit</groupId>
-          </exclusion>
-          <exclusion>
-            <artifactId>avalon-framework</artifactId>
-            <groupId>avalon-framework</groupId>
-          </exclusion>
-          <exclusion>
-            <artifactId>log4j</artifactId>
-            <groupId>log4j</groupId>
-          </exclusion>
-          <exclusion>
-            <groupId>javax.servlet</groupId>
-            <artifactId>servlet-api</artifactId>
-          </exclusion>
-        </exclusions>
-      </dependency>
-      <dependency>
         <groupId>commons-lang</groupId>
         <artifactId>commons-lang</artifactId>
         <version>${version.commons-lang}</version>
@@ -417,7 +412,6 @@
     <version.javax.persistence>1.0.2</version.javax.persistence>
     <version.commons-lang>2.4</version.commons-lang>
     <version.commons-collections>3.2.1</version.commons-collections>
-    <version.commons-logging>1.1</version.commons-logging>
     <version.apache-mime4j>0.6</version.apache-mime4j>
     <version.javax.mail>1.4.3</version.javax.mail>
     <version.activation>1.1.1</version.activation>

Modified: james/imap/trunk/processor/pom.xml
URL: http://svn.apache.org/viewvc/james/imap/trunk/processor/pom.xml?rev=1075970&r1=1075969&r2=1075970&view=diff
==============================================================================
--- james/imap/trunk/processor/pom.xml (original)
+++ james/imap/trunk/processor/pom.xml Tue Mar  1 18:30:41 2011
@@ -61,8 +61,8 @@
       <artifactId>${javax.mail.artifactId}</artifactId>
     </dependency>
     <dependency>
-      <groupId>commons-logging</groupId>
-      <artifactId>commons-logging</artifactId>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-api</artifactId>
     </dependency>
     <dependency>
       <groupId>junit</groupId>

Modified: james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/AbstractMailboxProcessor.java
URL: http://svn.apache.org/viewvc/james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/AbstractMailboxProcessor.java?rev=1075970&r1=1075969&r2=1075970&view=diff
==============================================================================
--- james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/AbstractMailboxProcessor.java (original)
+++ james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/AbstractMailboxProcessor.java Tue Mar  1 18:30:41 2011
@@ -229,8 +229,8 @@ abstract public class AbstractMailboxPro
 
     private void handleResponseException(final ImapProcessor.Responder responder,
             MailboxException e, final HumanReadableText message, ImapSession session) {
-        session.getLog().info(message);
-        session.getLog().debug(message, e);
+        session.getLog().info(message.toString());
+        session.getLog().debug(message.toString(), e);
         // TODO: consider whether error message should be passed to the user
         final StatusResponse response = factory.untaggedNo(message);;
         responder.respond(response);

Modified: james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/AppendProcessor.java
URL: http://svn.apache.org/viewvc/james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/AppendProcessor.java?rev=1075970&r1=1075969&r2=1075970&view=diff
==============================================================================
--- james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/AppendProcessor.java (original)
+++ james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/AppendProcessor.java Tue Mar  1 18:30:41 2011
@@ -25,7 +25,6 @@ import java.util.Date;
 
 import javax.mail.Flags;
 
-import org.apache.commons.logging.Log;
 import org.apache.james.imap.api.ImapCommand;
 import org.apache.james.imap.api.ImapSessionUtils;
 import org.apache.james.imap.api.display.HumanReadableText;
@@ -44,6 +43,7 @@ import org.apache.james.mailbox.MailboxP
 import org.apache.james.mailbox.MailboxSession;
 import org.apache.james.mailbox.MessageManager;
 import org.apache.james.mailbox.MessageManager.MetaData.FetchGroup;
+import org.slf4j.Logger;
 
 public class AppendProcessor extends AbstractMailboxProcessor<AppendRequest> {
 
@@ -107,7 +107,7 @@ public class AppendProcessor extends Abs
     private void tryCreate(ImapSession session, String tag, ImapCommand command, 
             Responder responder, MailboxNotFoundException e) {
         
-        final Log logger = session.getLog();
+        final Logger logger = session.getLog();
         if (logger.isDebugEnabled()) {
             logger.debug("Cannot open mailbox: ", e);
         }

Modified: james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/StatusProcessor.java
URL: http://svn.apache.org/viewvc/james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/StatusProcessor.java?rev=1075970&r1=1075969&r2=1075970&view=diff
==============================================================================
--- james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/StatusProcessor.java (original)
+++ james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/StatusProcessor.java Tue Mar  1 18:30:41 2011
@@ -19,7 +19,6 @@
 
 package org.apache.james.imap.processor;
 
-import org.apache.commons.logging.Log;
 import org.apache.james.imap.api.ImapCommand;
 import org.apache.james.imap.api.ImapSessionUtils;
 import org.apache.james.imap.api.display.HumanReadableText;
@@ -34,6 +33,7 @@ import org.apache.james.mailbox.MailboxM
 import org.apache.james.mailbox.MailboxPath;
 import org.apache.james.mailbox.MailboxSession;
 import org.apache.james.mailbox.MessageManager;
+import org.slf4j.Logger;
 
 public class StatusProcessor extends AbstractMailboxProcessor<StatusRequest> {
 
@@ -51,7 +51,7 @@ public class StatusProcessor extends Abs
             String tag, ImapCommand command, Responder responder) {
         final MailboxPath mailboxPath = buildFullPath(session, request.getMailboxName());
         final StatusDataItems statusDataItems = request.getStatusDataItems();
-        final Log logger = session.getLog();
+        final Logger logger = session.getLog();
         final MailboxSession mailboxSession = ImapSessionUtils.getMailboxSession(session);
 
         try {

Modified: james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/SystemMessageProcessor.java
URL: http://svn.apache.org/viewvc/james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/SystemMessageProcessor.java?rev=1075970&r1=1075969&r2=1075970&view=diff
==============================================================================
--- james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/SystemMessageProcessor.java (original)
+++ james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/SystemMessageProcessor.java Tue Mar  1 18:30:41 2011
@@ -19,7 +19,6 @@
 
 package org.apache.james.imap.processor;
 
-import org.apache.commons.logging.Log;
 import org.apache.james.imap.api.ImapSessionUtils;
 import org.apache.james.imap.api.process.ImapProcessor;
 import org.apache.james.imap.api.process.ImapSession;
@@ -28,6 +27,7 @@ import org.apache.james.imap.processor.b
 import org.apache.james.mailbox.MailboxException;
 import org.apache.james.mailbox.MailboxManager;
 import org.apache.james.mailbox.MailboxSession;
+import org.slf4j.Logger;
 
 /**
  * Processes system messages unrelated to IMAP.
@@ -52,7 +52,7 @@ public class SystemMessageProcessor exte
                     break;
             } 
         } catch (MailboxException e) {
-            final Log log = session.getLog();
+            final Logger log = session.getLog();
             log.warn("Force logout failed " + e.getMessage());
             log.debug("Cannot force logout", e);
         }

Modified: james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/base/UnknownRequestProcessor.java
URL: http://svn.apache.org/viewvc/james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/base/UnknownRequestProcessor.java?rev=1075970&r1=1075969&r2=1075970&view=diff
==============================================================================
--- james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/base/UnknownRequestProcessor.java (original)
+++ james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/base/UnknownRequestProcessor.java Tue Mar  1 18:30:41 2011
@@ -19,7 +19,6 @@
 
 package org.apache.james.imap.processor.base;
 
-import org.apache.commons.logging.Log;
 import org.apache.james.imap.api.ImapCommand;
 import org.apache.james.imap.api.ImapMessage;
 import org.apache.james.imap.api.display.HumanReadableText;
@@ -28,6 +27,7 @@ import org.apache.james.imap.api.message
 import org.apache.james.imap.api.message.response.StatusResponseFactory;
 import org.apache.james.imap.api.process.ImapProcessor;
 import org.apache.james.imap.api.process.ImapSession;
+import org.slf4j.Logger;
 
 public class UnknownRequestProcessor implements ImapProcessor {
 
@@ -39,7 +39,7 @@ public class UnknownRequestProcessor imp
     }
 
     public ImapResponseMessage process(ImapMessage message, ImapSession session) {
-        Log logger = session.getLog();
+        Logger logger = session.getLog();
         if (logger != null && logger.isDebugEnabled()) {
             logger.debug("Unknown message: " + message);
         }

Modified: james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/fetch/EnvelopeBuilder.java
URL: http://svn.apache.org/viewvc/james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/fetch/EnvelopeBuilder.java?rev=1075970&r1=1075969&r2=1075970&view=diff
==============================================================================
--- james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/fetch/EnvelopeBuilder.java (original)
+++ james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/fetch/EnvelopeBuilder.java Tue Mar  1 18:30:41 2011
@@ -25,7 +25,6 @@ package org.apache.james.imap.processor.
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.commons.logging.Log;
 import org.apache.james.imap.api.ImapConstants;
 import org.apache.james.imap.message.response.FetchResponse;
 import org.apache.james.mailbox.Headers;
@@ -38,11 +37,12 @@ import org.apache.james.mime4j.field.add
 import org.apache.james.mime4j.field.address.MailboxList;
 import org.apache.james.mime4j.field.address.parser.ParseException;
 import org.apache.james.mime4j.util.MimeUtil;
+import org.slf4j.Logger;
 
 final class EnvelopeBuilder {
-    private final Log logger;
+    private final Logger logger;
 
-    public EnvelopeBuilder(final Log logger) {
+    public EnvelopeBuilder(final Logger logger) {
         super();
         this.logger = logger;
     }

Modified: james/imap/trunk/processor/src/test/java/org/apache/james/imap/processor/base/MailboxEventAnalyserTest.java
URL: http://svn.apache.org/viewvc/james/imap/trunk/processor/src/test/java/org/apache/james/imap/processor/base/MailboxEventAnalyserTest.java?rev=1075970&r1=1075969&r2=1075970&view=diff
==============================================================================
--- james/imap/trunk/processor/src/test/java/org/apache/james/imap/processor/base/MailboxEventAnalyserTest.java (original)
+++ james/imap/trunk/processor/src/test/java/org/apache/james/imap/processor/base/MailboxEventAnalyserTest.java Tue Mar  1 18:30:41 2011
@@ -30,12 +30,12 @@ import java.util.Map;
 
 import javax.mail.Flags;
 
-import org.apache.commons.logging.Log;
 import org.apache.james.mailbox.MailboxListener;
 import org.apache.james.mailbox.MailboxPath;
 import org.apache.james.mailbox.MailboxSession;
 import org.junit.Before;
 import org.junit.Test;
+import org.slf4j.Logger;
 
 public class MailboxEventAnalyserTest {
 
@@ -67,7 +67,7 @@ public class MailboxEventAnalyserTest {
             return null;
         }
 
-        public Log getLog() {
+        public Logger getLog() {
             return null;
         }
 



---------------------------------------------------------------------
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