summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2022-03-31 23:17:48 +0200
committerLudovic Courtès <ludo@gnu.org>2022-04-04 22:58:03 +0200
commite692dc632cbb0e6d21ed6f09f4c7f52391802cfb (patch)
tree6ff42e58b0792971f13b9a1d3aa40af986b4c579 /doc
parent3b9b3b49316596bc1fab2834ef156091b553b4b7 (diff)
downloadguix-patches-e692dc632cbb0e6d21ed6f09f4c7f52391802cfb.tar
guix-patches-e692dc632cbb0e6d21ed6f09f4c7f52391802cfb.tar.gz
services: Add 'log-cleanup' service to '%base-services' for build logs.
* gnu/services/base.scm (%base-services): Add 'log-cleanup-service-type' instance. * doc/guix.texi (Log Rotation): Add example and mention '%base-services'.
Diffstat (limited to 'doc')
-rw-r--r--doc/guix.texi12
1 files changed, 11 insertions, 1 deletions
diff --git a/doc/guix.texi b/doc/guix.texi
index ad2763ec8a..b539a78663 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -17645,7 +17645,17 @@ 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.
+@code{log-cleanup} service addresses this use case. For example,
+@code{%base-services} (@pxref{Base Services}) includes the following:
+
+@lisp
+;; Periodically delete old build logs.
+(service log-cleanup-service-type
+ (log-cleanup-configuration
+ (directory "/var/log/guix/drvs")))
+@end lisp
+
+That ensures build logs do not accumulate endlessly.
@defvr {Scheme Variable} log-cleanup-service-type
This is the type of the service to delete old logs. Its value must be a