guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to print values inside shepherd service gexp


From: Attila Lendvai
Subject: Re: how to print values inside shepherd service gexp
Date: Mon, 27 Mar 2023 08:52:13 +0000

> (shepherd-service
> (start
> #~(make-forkexec-constructor
> some-command
> #:directory (pk #$twgter-directory)
> #:log-file (pk #$twgter-log-file))
> ))
> 
> If we instantiate this process in our OS declaration under services
> and then run that OS inside a container and `herd start
> this-service`, where would the above (pk ..) values show up? They
> aren't in /var/log/messages and they aren't in whatever #:log-file we
> specified. I imagine this gexp turns into a Guile script somewhere
> inside the store and Shepherd runs it when we start the service.


my understanding is that they will run when shepherd starts the
service, and it should land in /var/log/messages.

but in my experience shepherd's handling of logs and stdout should
receive some more care.

e.g. errors from the start GEXP are not logged, and if an error
happens before your pk's, then you won't see any sign of them.

i have a commit that i'm testing locally that addresses that:

https://github.com/attila-lendvai-patches/shepherd/commits/attila

HTH,

-- 
• attila lendvai
• PGP: 963F 5D5F 45C7 DFCD 0A39
--
“What you do speaks so loud I cannot hear what you say.”
        — Ralph Waldo Emerson (1803–1882)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]