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: [email protected]
For additional commands, e-mail: [email protected]