~ruther/guix-local

254ea3f945e8bc44f8c3a4159302f24f4fe5f216 — Ludovic Courtès 8 years ago 81fa222
services: rottlog: Make extensible.

* gnu/services/admin.scm (rottlog-service-type)[compose, extend]: New
fields.
* doc/guix.texi (Log Rotation): Mention extension.
2 files changed, 9 insertions(+), 0 deletions(-)

M doc/guix.texi
M gnu/services/admin.scm
M doc/guix.texi => doc/guix.texi +3 -0
@@ 9561,6 9561,9 @@ with the default settings, for commonly encountered log files.
This is the type of the Rottlog service, whose value is a
@code{rottlog-configuration} object.

Other services can extend this one with new @code{log-rotation} objects
(see below), thereby augmenting the set of files to be rotated.

This service type can define mcron jobs (@pxref{Scheduled Job
Execution}) to run the rottlog service.
@end defvr

M gnu/services/admin.scm => gnu/services/admin.scm +6 -0
@@ 164,6 164,12 @@ for ROTATION."
                     ;; the documentation.
                     (service-extension profile-service-type
                                        (compose list rottlog-rottlog))))
   (compose concatenate)
   (extend (lambda (config rotations)
             (rottlog-configuration
              (inherit config)
              (rotations (append (rottlog-rotations config)
                                 rotations)))))
   (default-value (rottlog-configuration))))

;;; admin.scm ends here