unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Attila Lendvai <attila@lendvai.name>
To: Vladilen Kozin <vladilen.kozin@gmail.com>
Cc: guix-devel@gnu.org
Subject: Re: how to print values inside shepherd service gexp
Date: Mon, 27 Mar 2023 08:52:13 +0000	[thread overview]
Message-ID: <792Wq_nV0u6HA8MqreYe3w4t_RvwAPc17nxHQb2TCkUChCScWrGID9LHersgzD4-hbEA03edK63nVaAPI-Q5mC0zxuafa26TMutGY664pUc=@lendvai.name> (raw)
In-Reply-To: <CACw=CXOUDDAhhe6UaJtU5FH80zVR_2tyqMwEma2S6SwD8CuMew@mail.gmail.com>

> (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	other threads:[~2023-03-27  8:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-24 14:55 how to print values inside shepherd service gexp Vladilen Kozin
2023-03-27  8:52 ` Attila Lendvai [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='792Wq_nV0u6HA8MqreYe3w4t_RvwAPc17nxHQb2TCkUChCScWrGID9LHersgzD4-hbEA03edK63nVaAPI-Q5mC0zxuafa26TMutGY664pUc=@lendvai.name' \
    --to=attila@lendvai.name \
    --cc=guix-devel@gnu.org \
    --cc=vladilen.kozin@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).