From: adam Date: Wed, 7 Jul 2004 08:52:42 +0000 (+0000) Subject: changed errors to warnings X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=3d642d7c733d5ddaf8d8dfa00b0299869201a387;p=org.ibex.mail.git changed errors to warnings darcs-hash:20040707085242-5007d-4ffe7df2b54da38feac0a7b7ab20e9daab39b4fb.gz --- diff --git a/src/org/ibex/mail/protocol/SMTP.java b/src/org/ibex/mail/protocol/SMTP.java index 0509c28..ea2363b 100644 --- a/src/org/ibex/mail/protocol/SMTP.java +++ b/src/org/ibex/mail/protocol/SMTP.java @@ -71,7 +71,7 @@ public class SMTP { if (!m.envelopeTo.isLocal()) Outgoing.accept(m); else Target.root.accept(m); } - if (m != null) Log.error(SMTP.class, "accepted message: " + m.summary()); + if (m != null) Log.info(SMTP.class, "accepted message: " + m.summary()); conn.println("250 message accepted"); conn.flush(); from = null; to = new Vector(); @@ -91,7 +91,7 @@ public class SMTP { private static final HashSet deadHosts = new HashSet(); public static void accept(Message m) throws IOException { - Log.error("[outgoing]", "accept():\n" + m.summary()); + Log.info(SMTP.class, "queued:\n" + m.summary()); if (m.traces.length >= 100) Log.warn(SMTP.Outgoing.class, "Message with " + m.traces.length + " trace hops; dropping\n" + m.summary()); else synchronized(Outgoing.class) { @@ -134,7 +134,7 @@ public class SMTP { conn.println(m.toString()); conn.println("."); check(conn.readln()); - Log.info(SMTP.Outgoing.class, "message accepted by " + mx); + Log.info(SMTP.Outgoing.class, "success: message accepted by " + mx); accepted = true; conn.close(); } catch (Exception e) { @@ -142,7 +142,7 @@ public class SMTP { Log.warn(SMTP.Outgoing.class, "unable to send; error=" + e); Log.warn(SMTP.Outgoing.class, e); return false; - } finally { Log.setThreadAnnotation("[outgoing smtp] "); } + } return accepted; } diff --git a/src/org/ibex/mail/target/FileBasedMailbox.java b/src/org/ibex/mail/target/FileBasedMailbox.java index a7eccd4..f348f4c 100644 --- a/src/org/ibex/mail/target/FileBasedMailbox.java +++ b/src/org/ibex/mail/target/FileBasedMailbox.java @@ -89,7 +89,7 @@ public class FileBasedMailbox extends Mailbox.Default { public synchronized void add(Message message) { add(message, Mailbox.Flag.RECENT); } public synchronized void add(Message message, int flags) { - Log.error(this, "adding message to ["+toString()+"]:\n" + message.summary()); + Log.info(this, "adding message to ["+toString()+"]:\n" + message.summary()); try { int num = new File(path).list(filter).length; String name = path + slash + uidNext(true) + "." + @@ -105,7 +105,6 @@ public class FileBasedMailbox extends Mailbox.Default { message.dump(new Stream(fo)); fo.close(); f.renameTo(target); - Log.error(this, " done writing to " + target); } catch (IOException e) { throw new MailException.IOException(e); } } diff --git a/src/org/ibex/mail/target/Script.java b/src/org/ibex/mail/target/Script.java index d7328b4..89ff260 100644 --- a/src/org/ibex/mail/target/Script.java +++ b/src/org/ibex/mail/target/Script.java @@ -41,9 +41,9 @@ public class Script extends Target { public synchronized void accept(Message m) throws IOException, MailException { this.m = m; try { - Log.error(this, "invoking config..."); + Log.info(this, "invoking config..."); Object ret = js.call(m, null, null, null, 1); - Log.error(this, "config returned " + ret); + Log.info(this, "config returned " + ret); if (ret == null) throw new IOException("configuration script returned null"); if (ret instanceof Target) ((Target)ret).accept(m); //else if (ret instanceof Filter) ((Filter)ret).process(m);