guix_mirror_bot pushed a commit to branch master
in repository guix.

commit 90b1546bc2246eebee18d743bcb59e6700fcf8f9
Author: Maxim Cournoyer <[email protected]>
AuthorDate: Tue Feb 10 16:06:09 2026 +0900

    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
---
 doc/guix.texi              |  2 +-
 gnu/services/telephony.scm | 39 ++++++++++++++++++++-------------------
 2 files changed, 21 insertions(+), 20 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index 9d41b43d94..ce67ea9c82 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -32136,7 +32136,7 @@ The D-Bus package to use to start the required D-Bus 
session.
 The nss-certs package to use to provide TLS certificates.
 
 @item @code{enable-logging?} (default: @code{#t}) (type: boolean)
-Whether to enable logging to syslog.
+Whether to enable logging to @file{/var/log/jami}.
 
 @item @code{debug?} (default: @code{#f}) (type: boolean)
 Whether to enable debug level messages.
diff --git a/gnu/services/telephony.scm b/gnu/services/telephony.scm
index 4b28881718..a61098fb9b 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)

Reply via email to