diff options
author | Ludovic Courtès <ludo@gnu.org> | 2022-03-31 23:14:39 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2022-04-04 22:58:03 +0200 |
commit | 3b9b3b49316596bc1fab2834ef156091b553b4b7 (patch) | |
tree | 43af3bb62a9701bcb1657452a4987fb9f4b50f57 /doc/guix.texi | |
parent | 2bef31fe25523ee482c9e54b4bf0a7682f0c2382 (diff) | |
download | guix-3b9b3b49316596bc1fab2834ef156091b553b4b7.tar.gz |
services: Add 'log-cleanup-service-type'.
* gnu/services/admin.scm (<log-cleanup-configuration>): New record type. (log-cleanup-program, log-cleanup-mcron-jobs): New procedures. (log-cleanup-service-type): New variable. * doc/guix.texi (Log Rotation): Document it.
Diffstat (limited to 'doc/guix.texi')
-rw-r--r-- | doc/guix.texi | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/doc/guix.texi b/doc/guix.texi index e8ef4286be..ad2763ec8a 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -17641,6 +17641,34 @@ The list of syslog-controlled files to be rotated. By default it is: "/var/log/maillog")}. @end defvr +Some log files just need to be deleted periodically once they are old, +without any other criterion and without any archival step. This is the +case of build logs stored by @command{guix-daemon} under +@file{/var/log/guix/drvs} (@pxref{Invoking guix-daemon}). The +@code{log-cleanup} service addresses this use case. + +@defvr {Scheme Variable} log-cleanup-service-type +This is the type of the service to delete old logs. Its value must be a +@code{log-cleanup-configuration} record as described below. +@end defvr + +@deftp {Data Type} log-cleanup-configuration +Data type representing the log cleanup configuration + +@table @asis +@item @code{directory} +Name of the directory containing log files. + +@item @code{expiry} (default: @code{(* 6 30 24 3600)}) +Age in seconds after which a file is subject to deletion (six months by +default). + +@item @code{schedule} (default: @code{"30 12 01,08,15,22 * *"}) +String or gexp denoting the corresponding mcron job schedule +(@pxref{Scheduled Job Execution}). +@end table +@end deftp + @node Networking Setup @subsection Networking Setup |