]> Pileus Git - ~andy/fetchmail/commitdiff
Jan Klaverstijn's verbosity patch.
authorEric S. Raymond <esr@thyrsus.com>
Thu, 31 Oct 2002 12:43:04 +0000 (12:43 -0000)
committerEric S. Raymond <esr@thyrsus.com>
Thu, 31 Oct 2002 12:43:04 +0000 (12:43 -0000)
svn path=/trunk/; revision=3760

driver.c
fetchmail.c
fetchmail.man

index b1fa4bf44a363980f4e1cbf0f3fddd1c535b0c0b..f02683567642065904859e3546c71a1f0efaf122 100644 (file)
--- a/driver.c
+++ b/driver.c
@@ -420,7 +420,16 @@ static int fetch_messages(int mailserver_socket, struct query *ctl,
        {
            if ((msgcodes[num-1] == MSGLEN_TOOLARGE) && !check_only)
                mark_oversized(ctl, num, msgsizes[num-1]);
-           if (outlevel > O_SILENT)
+               /* To avoid flooding the syslog when using --keep,
+                * report "Skipped message" only when:
+                *  1) --verbose is on, or
+                *  2) fetchmail does not use syslog, or
+                *  3) the message was skipped for some other
+                *     reason than being old.
+                */
+           if (   (outlevel >= O_VERBOSE) ||
+                  (outlevel > O_SILENT && (!run.use_syslog || msgcodes[num-1] != MSGLEN_OLD))
+              )
            {
                report_build(stdout, 
                             GT_("skipping message %s@%s:%d (%d octets)"),
@@ -697,7 +706,16 @@ static int fetch_messages(int mailserver_socket, struct query *ctl,
            delete_str(&ctl->newsaved, num);
 #endif /* POP3_ENABLE */
        }
-       else if (outlevel > O_SILENT)
+       else if (   (outlevel >= O_VERBOSE) ||
+                       /* To avoid flooding the syslog when using --keep,
+                        * report "Skipped message" only when:
+                        *  1) --verbose is on, or
+                        *  2) fetchmail does not use syslog, or
+                        *  3) the message was skipped for some other
+                        *     reason than just being old.
+                        */
+                  (outlevel > O_SILENT && (!run.use_syslog || msgcodes[num-1] != MSGLEN_OLD))
+              )
            report_complete(stdout, GT_(" not flushed\n"));
 
        /* perhaps this as many as we're ready to handle */
index 6eb0a39e6a778eb53b47797dcd7694e634a49f72..b59209d5f385e4e39697a45018d5837e1438794a 100644 (file)
@@ -761,7 +761,7 @@ int main(int argc, char **argv)
                    ctl->wedged = FALSE;
            }
 
-           if (outlevel >= O_VERBOSE)
+           if (outlevel > O_SILENT)
                report(stdout, GT_("awakened at %s\n"), timestamp());
        }
     } while
index 064a7c586ff0db295b2f8fba7f47738e6a26ef59..d6122d335b3c3b351b0c636d822c1e7910970098 100644 (file)
@@ -217,7 +217,10 @@ a static DNS.
 Force UIDL use (effective only with POP3).  Force client-side tracking
 of `newness' of messages (UIDL stands for ``unique ID listing'' and is
 described in RFC1725).  Use with `keep' to use a mailbox as a baby
-news drop for a group of users.
+news drop for a group of users. The fact that seen messages are skipped
+is logged, unless error logging is done through syslog while running in
+daemon mode.
+
 .TP
 .B \-P <portnumber> | \-\-port <portnumber>
 (Keyword: port)