james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nor...@apache.org
Subject svn commit: r1161227 - /james/server/trunk/smtpserver/src/main/java/org/apache/james/smtpserver/netty/SMTPChannelUpstreamHandler.java
Date Wed, 24 Aug 2011 18:46:40 GMT
Author: norman
Date: Wed Aug 24 18:46:40 2011
New Revision: 1161227

URL: http://svn.apache.org/viewvc?rev=1161227&view=rev
Log:
Include the session id in the log when logging an Exception

Modified:
    james/server/trunk/smtpserver/src/main/java/org/apache/james/smtpserver/netty/SMTPChannelUpstreamHandler.java

Modified: james/server/trunk/smtpserver/src/main/java/org/apache/james/smtpserver/netty/SMTPChannelUpstreamHandler.java
URL: http://svn.apache.org/viewvc/james/server/trunk/smtpserver/src/main/java/org/apache/james/smtpserver/netty/SMTPChannelUpstreamHandler.java?rev=1161227&r1=1161226&r2=1161227&view=diff
==============================================================================
--- james/server/trunk/smtpserver/src/main/java/org/apache/james/smtpserver/netty/SMTPChannelUpstreamHandler.java
(original)
+++ james/server/trunk/smtpserver/src/main/java/org/apache/james/smtpserver/netty/SMTPChannelUpstreamHandler.java
Wed Aug 24 18:46:40 2011
@@ -80,7 +80,12 @@ public class SMTPChannelUpstreamHandler 
             if (channel.isConnected()) {
                 ctx.getChannel().write(new SMTPResponse(SMTPRetCode.LOCAL_ERROR, "Unable
to process request"));
             }
-            logger.debug("Unable to process request", e.getCause());
+            SMTPSession smtpSession = (SMTPSession) attributes.get(channel);
+            if (smtpSession != null) {
+                smtpSession.getLogger().debug("Unable to process request", e.getCause());
+            } else {
+                logger.debug("Unable to process request", e.getCause());
+            }
             cleanup(channel);
             channel.close();
         }



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