fetchmail-friends
[Top] [All Lists]

[fetchmail]Again: FeatureRequest: log if fetchmail run is done

2001-10-02 02:52:32
Sorry for insisting, but it is still not what I hoped for. In 5.9.1 the
requested feature is implemented to log the end of a poll cycle. Thanks to
Eric for this. However, what I see is messages bracketing each user poll. I
ment to mark each poll of the daemon, between waking up and falling asleep
again. Also, the messages are only sent when logging to a file. I use syslog
and see no messages at all. I think there is confusion as to what a poll
cylce is. I assume the logic is

FOREACH interval
   FOREACH server
      FOREACH user
         fetchmail;

I regard a cycle to be "FOREACH interval", or at least "FOREACH server" (in
my case equivalent). The current implementation of therequest is "FOREACH
user". This also explains the concerns about verbosity.

I have patched the 5.9.1 version of fetchmail.c according to following diff
output. For reasons of symmetry, it also logs the beginning of the next
cycle (waking up of the daemon). it simply lowers thethreshold from VERBOSE
to >SILENT. While at it, I also removed the prepended "fetchmail:" label as
this is a bit redundant.
Could this very simple modification be implemented in 5.9.1+?

# diff fetchmail.c.orig fetchmail.c
719a720,726
            /*
             * Patch by Jan Klaverstijn, jan(_at_)klaverstijn(_dot_)nl 
sep'2001
             * Report end of cycle when in daemon mode.
             * Lowered minimum level for message from VERBOSE to normal.
             * Removed fetchmail: label from message.
             */
          /*** Old code removed:
722a730,733
             ***/
          if (outlevel > O_SILENT)
              report(stdout,
                     GT_("sleeping at %s\n"), timestamp());
743c754,759
<           if (outlevel >= O_VERBOSE)
---
         /*
          * Patch by Jan Klaverstijn, jan(_at_)klaverstijn(_dot_)nl sep'2001
          * Report beginning of next cycle when in daemon mode.
          * Lowered minimum level for message from VERBOSE to normal.
          */
          if (outlevel > O_SILENT)

Sample output:

Sep 27 11:22:05 gatekeeper fetchmail[27535]: awakened at Thu Sep 27 11:22:05
2001
Sep 27 11:22:09 gatekeeper fetchmail[27535]: 44 messages (44 seen) for
jan(_at_)klaverstijn(_dot_)nl at pop.euronet.nl (4692278 octets).
Sep 27 11:22:19 gatekeeper fetchmail[27535]: 24 messages (24 seen) for
user2(_at_)klaverstijn(_dot_)nl at pop.euronet.nl (2958234 octets).
Sep 27 11:22:24 gatekeeper fetchmail[27535]: 16 messages (16 seen) for
user3(_at_)klaverstijn(_dot_)nl at pop.euronet.nl (1790490 octets).
Sep 27 11:22:27 gatekeeper fetchmail[27535]: 1 message (1 seen) for
user4(_at_)klaverstijn(_dot_)nl at pop.euronet.nl (3123 octets).
Sep 27 11:22:31 gatekeeper fetchmail[27535]: 1 message (1 seen) for
user5(_at_)klaverstijn(_dot_)nl at pop.euronet.nl (97946 octets).
Sep 27 11:22:31 gatekeeper fetchmail[27535]: sleeping at Thu Sep 27 11:22:31
2001




<Prev in Thread] Current Thread [Next in Thread>