[bug#77383,v2,3/3] gnu: speakersafetyd: Add log file.
Commit Message
* gnu/services/sound.scm (speakersafetyd): Add log file.
* doc/guix.texi: Document log-file field.
Change-Id: I870bc7bfd69249da3a9c981f627e751395386bd2
---
doc/guix.texi | 3 +++
gnu/services/sound.scm | 10 +++++++---
2 files changed, 10 insertions(+), 3 deletions(-)
@@ -27271,6 +27271,9 @@ Sound Services
@item @code{group} (default: @code{"speakersafetyd"}) (type: string)
The group to run the Speaker Safety Daemon as.
+@item @code{log-file} (default: @code{"/var/log/speakersafetyd.log"}) (type: string)
+The path to the Speaker Safety Daemon log file.
+
@item @code{maximum-gain-reduction} (default: @code{7}) (type: integer)
Maximum gain reduction before panicking, useful for debugging.
@@ -293,6 +293,9 @@ (define-configuration/no-serialization speakersafetyd-configuration
(group
(string "speakersafetyd")
"The group to run the Speaker Safety Daemon as.")
+ (log-file
+ (string "/var/log/speakersafetyd.log")
+ "The path to the Speaker Safety Daemon log file.")
(maximum-gain-reduction
(integer 7)
"Maximum gain reduction before panicking, useful for debugging.")
@@ -305,7 +308,7 @@ (define-configuration/no-serialization speakersafetyd-configuration
(define speakersafetyd-accounts
(match-record-lambda <speakersafetyd-configuration>
- ( blackbox-directory configuration-directory group
+ ( blackbox-directory configuration-directory group log-file
maximum-gain-reduction speakersafetyd user)
(list (user-group
(name group)
@@ -320,7 +323,7 @@ (define speakersafetyd-accounts
(define speakersafetyd-activation
(match-record-lambda <speakersafetyd-configuration>
- ( blackbox-directory configuration-directory group
+ ( blackbox-directory configuration-directory group log-file
maximum-gain-reduction speakersafetyd user)
(with-imported-modules (source-module-closure '((gnu build activation)))
#~(begin
@@ -334,7 +337,7 @@ (define speakersafetyd-activation
(define speakersafetyd-shepherd-service
(match-record-lambda <speakersafetyd-configuration>
- ( blackbox-directory configuration-directory group
+ ( blackbox-directory configuration-directory group log-file
maximum-gain-reduction speakersafetyd user)
(shepherd-service
(documentation "Run the speaker safety daemon")
@@ -346,6 +349,7 @@ (define speakersafetyd-shepherd-service
"--blackbox-path" #$blackbox-directory
"--max-reduction" (number->string #$maximum-gain-reduction))
#:group #$group
+ #:log-file #$log-file
#:supplementary-groups '("audio")
#:user #$user))
(stop #~(make-kill-destructor)))))