[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: more informative logging for (shepherd) services
From: |
Maxim Cournoyer |
Subject: |
Re: more informative logging for (shepherd) services |
Date: |
Wed, 31 Oct 2018 09:13:25 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) |
Hello Florian,
Florian Dold <address@hidden> writes:
> Hi Guix,
>
> is there a way to obtain more informative logging from services that are
> started directly or indirectly (by GuixSD service) via shepherd?
>
> It seems right now, only what is sent to the syslog is logged. However,
> it would be immensely helpful if
>
> 1. the actual commands run by the shepherd for a service
> 2. the stdout/stderr of the service
> 3. the exit code of a process when it unexpectedly terminates
I can echo those feature requests :). I find shepherd pretty opaque to
debug (but I do like it :).
> would also be available. Is there there a way to enable this or plans
> to implement it?
I think it was discussed at some point, have you searched the mailing
list archives?
[...]
> Generally, how do folks debug GuixSD/shepherd services? I found it
> pretty difficult, as it looks like the Guile code that defines a service
> is minified and somewhere in the store. Is there a way to ask shepherd
> for the definition of a service?
The indirect way I've been proceeding (based on advice from Ludovic), is
grepping through the requisites of my system profile:
guix gc -R /var/guix/profiles/system | grep yourservice
And then opening that service definition in Emacs with Guix-Emacs
installed. It should reindent the Scheme code to make it readable (it
can be fired manually doing M-x guix-scheme-mode as well).
I hope this helps a bit,
Maxim