gnu: speakersafetyd: Add log file.

* gnu/services/sound.scm (speakersafetyd-configuration) [log-file]: New field.
(speakersafetyd): Use it via #:log-file.

Change-Id: I870bc7bfd69249da3a9c981f627e751395386bd2
This commit is contained in:
Roman Scherer 2025-04-09 19:26:11 +02:00 committed by Maxim Cournoyer
parent 01a66639ef
commit 98a6071b5a
No known key found for this signature in database
GPG key ID: 1260E46482E63562
2 changed files with 8 additions and 1 deletions

View file

@ -27270,6 +27270,9 @@ contains the configuration files of the speaker models.
@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 file name 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.

View file

@ -293,6 +293,9 @@ the configuration files of the speaker models.")
(group
(string "speakersafetyd")
"The group to run the Speaker Safety Daemon as.")
(log-file
(string "/var/log/speakersafetyd.log")
"The file name to the Speaker Safety Daemon log file.")
(maximum-gain-reduction
(integer 7)
"Maximum gain reduction before panicking, useful for debugging.")
@ -332,7 +335,7 @@ the configuration files of the speaker models.")
(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")
@ -344,6 +347,7 @@ the configuration files of the speaker models.")
"--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)))))