You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by no...@apache.org on 2011/08/24 20:46:40 UTC
svn commit: r1161227 -
/james/server/trunk/smtpserver/src/main/java/org/apache/james/smtpserver/netty/SMTPChannelUpstreamHandler.java
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