Subject: bug#30649: Cuirass service does not rotate its logs

From: Danny Milosavljevic <[email-masked]>
Date: Wed, 28 Feb 2018 17:48:23 +0100

Hi Andreas,

On Wed, 28 Feb 2018 15:50:39 +0100
Andreas Enge <[email-masked]> wrote:

> $ ll /var/log/c*
> -rw-r--r-- 1 root root 2003521 Feb 28 15:38 /var/log/cuirass.log
> 
> I am sure this 2MB file was about 14MB big this morning, and indeed
> any information dating from before this morning, when I rebooted the
> machine and thus restarted the service, has gone.
> 
> Notice also that there are no numbered files cuirass.log.1 etc..

The simplest and best way to fix that is to make cuirass use syslog.

Not every program has to have its own private logging implementation,
log rotator, log filterting, log rate limiter, kitchen sink etc.

src/cuirass/logging.scm is prepared somewhat for this possiblity[2], but it
doesn't yet log to syslog.

There are guile syslog bindings[1] and we should use them and then apply a
two-line patch to src/cuirass/logging.scm .

[1] http://puszcza.gnu.org.ua/software/gamma/manual/html_section/Syslog.html
[2] Replace current-logging-procedure