diff options
| author | Maxim Cournoyer <maxim@guixotic.coop> | 2026-02-10 16:06:09 +0900 |
|---|---|---|
| committer | Maxim Cournoyer <maxim@guixotic.coop> | 2026-02-10 18:07:49 +0900 |
| commit | 90b1546bc2246eebee18d743bcb59e6700fcf8f9 (patch) | |
| tree | efd4866f2cebdbfd9fc0788b2729ca88b4e04d1b /gnu | |
| parent | e92dafb302ca3a01538652f364cbd01f88d32853 (diff) | |
services: Fix logging for jami-service-type.
Its default behavior changed and it no longer logs to syslog by default;
update to log to /var/log/jami.log instead.
* gnu/services/telephony.scm (jami-configuration->command-line-arguments):
Drop /dev/log mapping. Add /var/log/jami.log mapping. Always add --console argument.
(jami-shepherd-services): Conditionally add #:log-file argument; simplify
usernames logic a bit.
* gnu/services/telephony.scm (jami-configuration): Update doc.
* doc/guix.texi (Telephony Services): Likewise.
Change-Id: Ia2819866c84db4cba92fad52dfd0a74acdc887fc
Diffstat (limited to 'gnu')
| -rw-r--r-- | gnu/services/telephony.scm | 39 |
1 files changed, 20 insertions, 19 deletions
diff --git a/gnu/services/telephony.scm b/gnu/services/telephony.scm index 4b288817182..a61098fb9b9 100644 --- a/gnu/services/telephony.scm +++ b/gnu/services/telephony.scm @@ -235,7 +235,7 @@ SET-ACCOUNT-DETAILS." "The nss-certs package to use to provide TLS certificates.") (enable-logging? (boolean #t) - "Whether to enable logging to syslog.") + "Whether to enable logging to @file{/var/log/jami.log}.") (debug? (boolean #f) "Whether to enable debug level messages.") @@ -269,20 +269,21 @@ CONFIG, a <jami-configuration> object." "bin") #:mappings (list (file-system-mapping - (source "/dev/log") ;for syslog - (target source)) + (source "/var/lib/jami") + (target source) + (writable? #t)) (file-system-mapping - (source "/var/lib/jami") - (target source) - (writable? #t)) + (source "/var/log/jami.log") + (target source) + (writable? #t)) (file-system-mapping - (source "/var/run/jami") - (target source) - (writable? #t)) + (source "/var/run/jami") + (target source) + (writable? #t)) ;; Expose TLS certificates for GnuTLS. (file-system-mapping - (source (file-append nss-certs "/etc/ssl/certs")) - (target "/etc/ssl/certs"))) + (source (file-append nss-certs "/etc/ssl/certs")) + (target "/etc/ssl/certs"))) #:preserved-environment-variables '("DBUS_SESSION_BUS_ADDRESS" "SSL_CERT_DIR") #:user "jami" @@ -290,12 +291,10 @@ CONFIG, a <jami-configuration> object." #:namespaces (fold delq %namespaces '(net user)))) (match-record config <jami-configuration> - (libjami dbus enable-logging? debug? auto-answer?) + (libjami dbus debug? auto-answer?) `(,(wrapper libjami) "--persistent" ;stay alive after client quits - ,@(if enable-logging? - '() ;logs go to syslog by default - (list "--console")) ;else stdout/stderr + "--console" ;ensure output goes to stdout/stderr ,@(if debug? (list "--debug") '()) @@ -351,6 +350,7 @@ CONFIG, a <jami-configuration> object." ;; so run it in the global user namespace. #:namespaces (fold delq %namespaces '(net user)))) + (enable-logging? (jami-configuration-enable-logging? config)) (accounts (jami-configuration-accounts config)) (declarative-mode? (maybe-value-set? accounts))) @@ -641,7 +641,8 @@ argument, either a registered username or the fingerprint of the account.") (list (string-append "DBUS_SESSION_BUS_ADDRESS=" "unix:path=/var/run/jami/bus") ;; Expose TLS certificates for OpenSSL. - "SSL_CERT_DIR=/etc/ssl/certs"))) + "SSL_CERT_DIR=/etc/ssl/certs") + #:log-file #$(and enable-logging? "/var/log/jami.log"))) (setenv "DBUS_SESSION_BUS_ADDRESS" "unix:path=/var/run/jami/bus") @@ -655,9 +656,9 @@ argument, either a registered username or the fingerprint of the account.") (map (cut string-append "/var/lib/jami/accounts/" <>) (scandir "/var/lib/jami/accounts/" - (lambda (f) - (not (member f '("." ".."))))))) - (usernames (map-in-order (cut add-account <>) + (negate + (cut member <> '("." "..")))))) + (usernames (map-in-order add-account jami-account-archives))) (define (archive-name->username archive) |
