unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#30649: Cuirass service does not rotate its logs
@ 2018-02-28 14:50 Andreas Enge
  2018-02-28 16:48 ` Danny Milosavljevic
  2018-03-01 16:35 ` Ludovic Courtès
  0 siblings, 2 replies; 7+ messages in thread
From: Andreas Enge @ 2018-02-28 14:50 UTC (permalink / raw)
  To: 30649

Hello,

while testing the cuirass service on bayfront, I see the following:

$ 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..

Andreas

^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#30649: Cuirass service does not rotate its logs
  2018-02-28 14:50 bug#30649: Cuirass service does not rotate its logs Andreas Enge
@ 2018-02-28 16:48 ` Danny Milosavljevic
  2018-03-01 16:35   ` Ludovic Courtès
  2018-03-01 16:35 ` Ludovic Courtès
  1 sibling, 1 reply; 7+ messages in thread
From: Danny Milosavljevic @ 2018-02-28 16:48 UTC (permalink / raw)
  To: Andreas Enge; +Cc: 30649

Hi Andreas,

On Wed, 28 Feb 2018 15:50:39 +0100
Andreas Enge <andreas@enge.fr> 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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#30649: Cuirass service does not rotate its logs
  2018-02-28 16:48 ` Danny Milosavljevic
@ 2018-03-01 16:35   ` Ludovic Courtès
  0 siblings, 0 replies; 7+ messages in thread
From: Ludovic Courtès @ 2018-03-01 16:35 UTC (permalink / raw)
  To: Danny Milosavljevic; +Cc: 30649

Danny Milosavljevic <dannym@scratchpost.org> skribis:

> Hi Andreas,
>
> On Wed, 28 Feb 2018 15:50:39 +0100
> Andreas Enge <andreas@enge.fr> 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 .

Indeed.  I wonder why we don’t have a Gamma package yet!

Ludo’.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#30649: Cuirass service does not rotate its logs
  2018-02-28 14:50 bug#30649: Cuirass service does not rotate its logs Andreas Enge
  2018-02-28 16:48 ` Danny Milosavljevic
@ 2018-03-01 16:35 ` Ludovic Courtès
  2018-03-01 16:36   ` Ludovic Courtès
  2018-03-01 16:43   ` Andreas Enge
  1 sibling, 2 replies; 7+ messages in thread
From: Ludovic Courtès @ 2018-03-01 16:35 UTC (permalink / raw)
  To: Andreas Enge; +Cc: 30649

Andreas Enge <andreas@enge.fr> skribis:

> while testing the cuirass service on bayfront, I see the following:
>
> $ ll /var/log/c*
> -rw-r--r-- 1 root root 2003521 Feb 28 15:38 /var/log/cuirass.log

The cuirass service in GuixSD explicitly extends rottlog so that this
file is rotated on a weekly basis.  Perhaps you just need to wait a
little longer?

Ludo’.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#30649: Cuirass service does not rotate its logs
  2018-03-01 16:35 ` Ludovic Courtès
@ 2018-03-01 16:36   ` Ludovic Courtès
  2018-03-01 16:43   ` Andreas Enge
  1 sibling, 0 replies; 7+ messages in thread
From: Ludovic Courtès @ 2018-03-01 16:36 UTC (permalink / raw)
  To: Andreas Enge; +Cc: 30649

ludo@gnu.org (Ludovic Courtès) skribis:

> Andreas Enge <andreas@enge.fr> skribis:
>
>> while testing the cuirass service on bayfront, I see the following:
>>
>> $ ll /var/log/c*
>> -rw-r--r-- 1 root root 2003521 Feb 28 15:38 /var/log/cuirass.log
>
> The cuirass service in GuixSD explicitly extends rottlog so that this
> file is rotated on a weekly basis.  Perhaps you just need to wait a
> little longer?

I confirm that rotation works as expected on berlin.

Ludo’.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#30649: Cuirass service does not rotate its logs
  2018-03-01 16:35 ` Ludovic Courtès
  2018-03-01 16:36   ` Ludovic Courtès
@ 2018-03-01 16:43   ` Andreas Enge
  2018-03-01 23:47     ` Ludovic Courtès
  1 sibling, 1 reply; 7+ messages in thread
From: Andreas Enge @ 2018-03-01 16:43 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 30649

On Thu, Mar 01, 2018 at 05:35:54PM +0100, Ludovic Courtès wrote:
> The cuirass service in GuixSD explicitly extends rottlog so that this
> file is rotated on a weekly basis.  Perhaps you just need to wait a
> little longer?

The problem is not that the file grows too large.

The problem was that after rebooting the server, the file was *replaced*
with newly written content. Maybe the problem is not rotation, but opening
a file in "write" instead of "append" mode...

Andreas

^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#30649: Cuirass service does not rotate its logs
  2018-03-01 16:43   ` Andreas Enge
@ 2018-03-01 23:47     ` Ludovic Courtès
  0 siblings, 0 replies; 7+ messages in thread
From: Ludovic Courtès @ 2018-03-01 23:47 UTC (permalink / raw)
  To: Andreas Enge; +Cc: 30649-done

Andreas Enge <andreas@enge.fr> skribis:

> On Thu, Mar 01, 2018 at 05:35:54PM +0100, Ludovic Courtès wrote:
>> The cuirass service in GuixSD explicitly extends rottlog so that this
>> file is rotated on a weekly basis.  Perhaps you just need to wait a
>> little longer?
>
> The problem is not that the file grows too large.
>
> The problem was that after rebooting the server, the file was *replaced*
> with newly written content. Maybe the problem is not rotation, but opening
> a file in "write" instead of "append" mode...

Oh indeed, that’s a different thing.

This is fixed by Shepherd commit
7b4c88bac70f0bad82ef70fd5b682a49bc227478, thanks!

Ludo’.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-03-02 13:01 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-28 14:50 bug#30649: Cuirass service does not rotate its logs Andreas Enge
2018-02-28 16:48 ` Danny Milosavljevic
2018-03-01 16:35   ` Ludovic Courtès
2018-03-01 16:35 ` Ludovic Courtès
2018-03-01 16:36   ` Ludovic Courtès
2018-03-01 16:43   ` Andreas Enge
2018-03-01 23:47     ` Ludovic Courtès

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).