GNU bug report logs - #36510
confusing mcron logging

Previous Next

Package: guix;

Reported by: Robert Vollmert <rob <at> vllmrt.net>

Date: Fri, 5 Jul 2019 13:37:01 UTC

Severity: normal

Done: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Dale Mellor <mcron-lsfnyl <at> rdmp.org>
To: 36510 <at> debbugs.gnu.org, Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Subject: bug#36510: [PATCH v3] base: Annotate output with job information.
Date: Tue, 04 Jan 2022 13:21:44 +0000
Hi, sorry for the delay but I've had a bit of time over Christmas
   to look things over. I've given this a lot of consideration.


I am happy to drop compatibility with guile-2.2 and older; I
   think we can make a minor version bump for this break with
   legacy.



Does this belong in mcron?  The mcron source code is currently
   3,000 lines, to which you are bringing over 500 new ones to
   make a facility which is geared towards debugging in the GUIX
   system (I am all-in on GUIX myself, but mcron is a generic GNU
   program with use-cases outside of this system).  I wonder if
   this is the best place: perhaps it is shepherd, which is
   responsible for the /var/log/mcron.log file, to be responsible
   for the amended logging messages?  And then again, isn't this
   exactly what syslogd does anyway?  Most likely timings will be
   more accurate if they are generated in mcron.

   In your use-case, of debugging the system, I would think that
   more specialized messages placed directly in the cron jobs
   themselves would be a better aid to your work, as you can
   target them to the problem at hand.  And you could send those
   to syslogd if you wanted.



The output is a little unpredictable.  The script (which is
   admittedly somewhat pathological)

     (job '(next-second '(0 30)) '(begin (display "test: ")
                                         (system "date")))

   produces

     2022-01-04T11:24:00 (...): running...
     2022-01-04T11:24:00 (...): Tue 4 Jan 11:24:00 GMT 2022
     2022-01-04T11:24:00 (...): test: completed in 0.022s
     2022-01-04T11:24:30 (...): running...
     2022-01-04T11:24:30 (...): Tue 4 Jan 11:24:30 GMT 2022
     2022-01-04T11:25:00 (...): running...
     2022-01-04T11:25:00 (...): Tue 4 Jan 11:25:00 GMT 2022
     ...



But all things considered your changes are generally useful to
   have, including outside of the GUIX system, and I would very
   much like to have them there.  But to be sure not to break any
   existing applications, I would like the changes to be opt-in
   via a command-line switch -l; the --log-format option can
   remain to customize this (please also make -L a short option
   alternative; also -D as short for --date-format).

   I am willing and able to do this work myself in a reasonable
   time-frame if you would like me to.



Best wishes, Dale






This bug report was last modified 2 years and 169 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.