supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
* ca catchall logger prefix log lines with service names?
@ 2022-10-25 14:19 Ihor Antonov
  2022-10-25 16:12 ` Laurent Bercot
  2022-10-25 16:23 ` Peter Shkenev
  0 siblings, 2 replies; 3+ messages in thread
From: Ihor Antonov @ 2022-10-25 14:19 UTC (permalink / raw)
  To: supervision

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-10-25 16:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-25 14:19 ca catchall logger prefix log lines with service names? Ihor Antonov
2022-10-25 16:12 ` Laurent Bercot
2022-10-25 16:23 ` Peter Shkenev

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).