ca catchall logger prefix log lines with service names?

From: Ihor Antonov <ihor_at_antonovs.family>
Date: Tue, 25 Oct 2022 07:19:20 -0700

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 (_at_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
Received on Tue Oct 25 2022 - 16:19:20 CEST

This archive was generated by hypermail 2.4.0 : Tue Oct 25 2022 - 16:19:21 CEST