unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Danny Milosavljevic <dannym@scratchpost.org>
To: David Craven <david@craven.ch>
Cc: guix-devel <guix-devel@gnu.org>
Subject: Re: [PATCH] service: Honor #:log-file in make-forkexec-constructor.
Date: Tue, 6 Sep 2016 21:13:32 +0200	[thread overview]
Message-ID: <20160906211332.46c690db@scratchpost.org> (raw)
In-Reply-To: <CAL1_immr_HFXrDpx2OA_vtrKeU5xOtM1MB46C2D2hHAkvR26eA@mail.gmail.com>

On Tue, 6 Sep 2016 14:36:35 +0200
David Craven <david@craven.ch> wrote:

> Not syslog, but helps with debugging...

That definitely helps - however, in the long run, I think that using syslog is better. Syslog does the splitting up in different files (or not) and onto different machines (or not), filtering (or not), log rotation etc. So it makes sense to make services use syslog instead of rolling-your-own filtering, splitting, networking etcetc 267843 times. That said the services should just use syslog on their own - we could only guess when a new log message starts.

I checked out the syslog wire format - it's not difficult. The only thing to keep in mind is that the local sockets wants a NUL terminator (if it's a stream socket) but a network node doesn't (makes sense - the network thing is UDP packets and the message is just one packet long). I think always including it doesn't hurt.
The prefix is (facility << 3) | priority in angle brackets.

https://www.gnu.org/software/anubis/manual/html_section/anubis_11.html seems to already support syslog, maybe we can copy it from there.

https://netkiller.github.io/python/library/syslog.html small public domain implementation of syslog client in Python.

https://tools.ietf.org/html/rfc5424#section-6.1 lists message length limits.

Or we could pipe the output to "logger" from inetutils.

  reply	other threads:[~2016-09-06 19:13 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-04 11:26 Shepherd redirect stdout/stderr to syslog David Craven
2016-09-05 13:44 ` David Craven
2016-09-05 21:14   ` Ludovic Courtès
2016-09-06 12:35     ` [PATCH] service: Honor #:log-file in make-forkexec-constructor David Craven
2016-09-06 12:36       ` David Craven
2016-09-06 19:13         ` Danny Milosavljevic [this message]
2016-09-06 20:02           ` David Craven
2016-09-11 13:34       ` Ludovic Courtès

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=20160906211332.46c690db@scratchpost.org \
    --to=dannym@scratchpost.org \
    --cc=david@craven.ch \
    --cc=guix-devel@gnu.org \
    /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).