From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50384) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dJ4SP-0000bU-Md for guix-patches@gnu.org; Thu, 08 Jun 2017 16:55:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dJ4SN-0006tZ-3C for guix-patches@gnu.org; Thu, 08 Jun 2017 16:55:05 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:32873) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dJ4SM-0006tT-W6 for guix-patches@gnu.org; Thu, 08 Jun 2017 16:55:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dJ4SM-0003sY-Pg for guix-patches@gnu.org; Thu, 08 Jun 2017 16:55:02 -0400 Subject: bug#27291: [PATCH 2/2] services: rottlog: Make extensible. Resent-Message-ID: From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Date: Thu, 8 Jun 2017 22:53:52 +0200 Message-Id: <20170608205352.21398-2-ludo@gnu.org> In-Reply-To: <20170608205352.21398-1-ludo@gnu.org> References: <20170608205352.21398-1-ludo@gnu.org> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 27291@debbugs.gnu.org * gnu/services/admin.scm (rottlog-service-type)[compose, extend]: New fields. * doc/guix.texi (Log Rotation): Mention extension. --- doc/guix.texi | 3 +++ gnu/services/admin.scm | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/doc/guix.texi b/doc/guix.texi index 597fb9812..8a08fd9f7 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -9560,6 +9560,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 diff --git a/gnu/services/admin.scm b/gnu/services/admin.scm index 99f3b1da1..b9e3fa70a 100644 --- a/gnu/services/admin.scm +++ b/gnu/services/admin.scm @@ -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 -- 2.13.0