I'm trying to track down a couple of delivery oddities.  Found this to be a
useful addition to the logging.  It is only active when debug is disabled,
because otherwise it would be redundant with the SMTP protocol session log.

        --- Noel
Index: src/java/org/apache/james/smtpserver/SMTPHandler.java
===================================================================
RCS file: 
/home/cvspublic/jakarta-james/src/java/org/apache/james/smtpserver/SMTPHandler.java,v
retrieving revision 1.30
diff -u -r1.30 SMTPHandler.java
--- src/java/org/apache/james/smtpserver/SMTPHandler.java       2 Oct 2002 06:57:56 
-0000       1.30
+++ src/java/org/apache/james/smtpserver/SMTPHandler.java       5 Oct 2002 01:30:47 
+-0000
@@ -1265,6 +1265,14 @@
                 mailServer.sendMail(mail);
                 if (getLogger().isDebugEnabled()) {
                     getLogger().debug("Successfully sent mail to spool: " + 
mail.getName());
+                } else if (getLogger().isInfoEnabled()) {
+                    StringBuffer infoBuffer =
+                        new StringBuffer(256)
+                            .append("Successfully spooled mail from ")
+                            .append(mail.getSender())
+                            .append(" for ")
+                            .append(mail.getRecipients().toString());
+                    getLogger().info(infoBuffer.toString());
                 }
             } catch (MessagingException me) {
                 // Grab any exception attached to this one.

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to