supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
From: Ihor Antonov <ihor@antonovs.family>
To: supervision@list.skarnet.org
Subject: ca catchall logger prefix log lines with service names?
Date: Tue, 25 Oct 2022 07:19:20 -0700	[thread overview]
Message-ID: <20221025141920.rxxk6qkxpggloryt@localhost> (raw)

Hi,

I am trying to figure out if I can set up svscan catchall logger in such
a way that it prepends a service name to every log line, so that it can
be clear where the log came from.

I am trying to avoid s6-rc setup where I need to explicitly create a
matching logger service.

Today I do this:
        
        s6-svscan $S6_RC_DIR | s6-log -- t s16777216 n64 $HOME/.local/log/svscan

But creates a log file where all logs from all services are mixed up and
are impossible to distinguish. There is already a strange looking thing
prepended to every line (@400000006356da4b2cb3ba0a - a timestamp?), so
one might say we have already started doing structured logging.

Is it possible to somehow add add service name as a second field in the
log line?

Thanks

Ihor

             reply	other threads:[~2022-10-25 14:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-25 14:19 Ihor Antonov [this message]
2022-10-25 16:12 ` Laurent Bercot
2022-10-25 16:23 ` Peter Shkenev

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

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

  git send-email \
    --in-reply-to=20221025141920.rxxk6qkxpggloryt@localhost \
    --to=ihor@antonovs.family \
    --cc=supervision@list.skarnet.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.
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 NNTP newsgroup(s).