From 3f055fb818c556491361a665d9f8d649d766cdb8 Mon Sep 17 00:00:00 2001 From: Hatim Thayyil Date: Sun, 24 Mar 2024 16:27:00 +0000 Subject: [PATCH] use XDG_STATE_HOME instead of XDG_LOG_HOME - See https://wiki.debian.org/XDGBaseDirectorySpecification --- README.org | 2 +- dtao-guile/home-service.scm | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/README.org b/README.org index 8ea548f..0ccd89a 100644 --- a/README.org +++ b/README.org @@ -58,7 +58,7 @@ herd stop dtao-guile herd restart dtao-guile #+end_src -Logs are available at =$XDG_LOG_HOME/dtao-guile.log= (logs will be saved to your home directory if =$XDG_LOG_HOME= is not set). +Logs are available at =$XDG_STATE_HOME/log/dtao-guile.log= (logs will be saved to =$HOME/.local/state/log/dtao-guile.log= if =$XDG_STATE_HOME= is not set). *** Configuring =dtao-guile= diff --git a/dtao-guile/home-service.scm b/dtao-guile/home-service.scm index aead733..bbc70e7 100644 --- a/dtao-guile/home-service.scm +++ b/dtao-guile/home-service.scm @@ -110,8 +110,10 @@ #$(file-append (home-dtao-guile-configuration-package config) "/bin/dtao-guile") "-c" #$(string-append config-dir "/config.scm")) #:user (getenv "USER") - #:log-file #$(string-append (or (getenv "XDG_LOG_HOME") (getenv "HOME")) - "/dtao-guile.log")))) + #:log-file #$(format #f "~a/log/dtao-guile.log" + (or (getenv "XDG_STATE_HOME") + (format #f "~a/.local/state" + (getenv "HOME"))))))) (stop #~(make-kill-destructor))))) (define (home-dtao-guile-extensions cfg extensions)