From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id oD0tEwEZj2HmEQAAgWs5BA (envelope-from ) for ; Sat, 13 Nov 2021 02:46:41 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id 6AK7DgEZj2EdEgAAbx9fmQ (envelope-from ) for ; Sat, 13 Nov 2021 01:46:41 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 985045838 for ; Sat, 13 Nov 2021 02:46:40 +0100 (CET) Received: from localhost ([::1]:37568 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mli7l-0002D9-LO for larch@yhetil.org; Fri, 12 Nov 2021 20:46:34 -0500 Received: from eggs.gnu.org ([209.51.188.92]:60306) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mli7S-0002Ct-Qc for help-guix@gnu.org; Fri, 12 Nov 2021 20:46:14 -0500 Received: from mout01.posteo.de ([185.67.36.65]:56153) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mli7P-00080N-TK for help-guix@gnu.org; Fri, 12 Nov 2021 20:46:14 -0500 Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id 8F00F240026 for ; Sat, 13 Nov 2021 02:46:08 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1636767968; bh=feYmczxsGwLpVup3cE6gLhmXpgMh9YQCJJz73LSamSM=; h=From:To:Subject:Date:From; b=e0A2dTlY3qNIVH1iIHoU30Uz0aZ9l23gAv7wKuv7e0DYJJen8pIK7mTp+WKxgIMpB 5Szh4IWG5SoLR/aRZysc7rPldg8o2dgrM1BLojO+vdnMaX05VyNlhOWOx2CmzcM2c4 TQJdVmT8rujtfZ/FqybOVI14YiXEY57IyTS0cxzJA4W81i+3TIFmSPWUqeDapI0SIa K0E60/xZrEJB2sKGj/65PPlIU2VkoJg17jIIuekErDe1JlBOJ5DHjrEQ3Dk4AV+IE8 wP5BMGXD3P4yJz0wW7pSXR9OSfmJz8DNI0ZOhXqQLw3AzPfVjzgN8FAbiT+j7DAGKj Lf0DBsXMFgMiw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Hrdb34Dnpz9rxF for ; Sat, 13 Nov 2021 02:46:07 +0100 (CET) From: Fredrik Salomonsson To: help-guix Subject: Logging and guix-home Date: Sat, 13 Nov 2021 01:45:57 +0000 Message-ID: <87o86oygiy.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.65; envelope-from=plattfot@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: "Help-Guix" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1636768000; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=u9297GtGx/EE/NPiomEPfqgZazqfH3BLZcTwyYWr6KA=; b=kuULFqFUq8SooKljK947z2jNySadlikKcYbfy4qaSX1i6dl0ERPOXPp4GocnLejf9iLNdU nqESrgR3Z8inOmZLQyPySrEcpWN8qPmgLkxUcfafB0Y1wFSNrDICwvXrwLLzPx6HwqUae9 xmtew3N9Gi3PQPJFH/jj64lny+CulZN3eO45xjhdje8FKQgnNRVSHqX6BRkjlsPaFWB4lV jV8ZA3ime4diPUM78VSzBLM9d/4a34doY36BMT3rJLT1eZBbVyX+N24ndXKpQQgjKra3Wb 37rUEO6d32/chI3l/u7r/Vqb3EEbp4laO/xNEA4EE54ClbOeRxget9yi6aNOXg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1636768000; a=rsa-sha256; cv=none; b=bp8/DjzNOriB4Piyp1J0L+DOuHGWtdyRSDjbisxVzDEo8a75ssSKX5jm/sWGhlt+7NZ5nS dBdE6RsaBtPkzykVULi8bE9Lk7eG7vWLNkHu8mdMqi/3L2GxDodHkM/zeeGeFk9e9IDLJA habnGPHN7Y/nq3zRJo8EQLHp1ds1/7/HnLsFcXrjd5xEHN3lYG+aLjz/ugBFlE4wM6c4Sh tA7TR3MCTvVurxNJlZTOW3xKBX/UMH0IprIIgxgj2stiIgsZY6/+cI4n0WUEf2bNybD8O6 KXdc/16psVj7w3ESJghILwoAOp/GV6T60HI2NuxzcA8YdehAUma94nd1vqw6Cw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=e0A2dTlY; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -3.73 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=e0A2dTlY; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 985045838 X-Spam-Score: -3.73 X-Migadu-Scanner: scn0.migadu.com X-TUID: hDBQT/Y+JZXd Hi Guix, I got a question how to setup logging for daemons that are controlled by shepherd that guix home creates. First some background info. I have been slowly migrating my dotfiles from a GNU stow setup to guix home. I'm currently using guix on a foreign distro that uses systemd. Where systemd was controlling my user level daemons, e.g. ssh-agent. But now that I use guix home, I have migrated them to shepherd. With that I lost the handy logging you get from systemd. To mitigate that for shepherd I'm right now using the #:log-file parameter, as suggested in this thread [1], to send the output to a file. [1] https://lists.gnu.org/archive/html/help-guix/2019-04/msg00178.html Here's how I've setup the ssh-agent --8<---------------------------------------------------------------------------- (define-public services (list (simple-service 'plt-ssh-environment home-environment-variables-service-type `(("SSH_AUTH_SOCK" . "${XDG_RUNTIME_DIR}/ssh-agent.socket"))) (simple-service 'plt-ssh-agent home-shepherd-service-type `( ,(shepherd-service (provision '(ssh-agent)) (documentation "Run and control ssh key agent.") (start #~(make-forkexec-constructor `("ssh-agent" "-D" "-a" ,(format #f "~a/ssh-agent.socket" (getenv "XDG_RUNTIME_DIR"))) #:log-file (format #f "~a/ssh-agent.log" (getenv "XDG_LOG_HOME")))) (stop #~(make-kill-destructor))) )))) ---------------------------------------------------------------------------->8-- I do want some better logging, than just dumping to a file, as otherwise I'll eventual run out of disk space. I have been pretty spoiled with systemd on that part, and I have very little experience with syslog. Given that I'm on a foreign distro, I cannot use the syslog-service (as far as I know). Does anyone have a good idea on how to set this it up? For example if I setup syslog and put "/dev/log" in the #:log-file parameter, will it work? Or is syslog the wrong thing for user daemon logging? and instead I should look for something else? Thanks -- s/Fred[re]+i[ck]+/Fredrik/g