:: Re: [DNG] Everyone OK for using the…
Góra strony
Delete this message
Reply to this message
Autor: Olaf Meeuwissen
Data:  
Dla: Didier Kryn
CC: dng\@lists.dyne.org
Temat: Re: [DNG] Everyone OK for using the logger program for runit logging?
Hi Didier,

Didier Kryn writes:

> Le 24/10/2018 à 13:34, Olaf Meeuwissen a écrit:
>> Of these, rsyslog is installed by default, at least on ascii. If you
>> could assume rsyslog is always installed, binding the daemon's stdout
>> and stderr to /dev/log would work fine too.
>
> Not that simple. There's the risk of several processes writing
> simultaneously to the same socket. It would mix and mess the messages.
> You need the lock to synchronize writers. Plus the syslog daemon which
> reads it expects a given format containing the log facility, the log
> level, the application name, and properly made date/time format. This is
> all wrapped in syslog().


Thanks for pointing out my oversight. I had been using a very similar
approach for a number of Docker containers, using the syslog driver to
write to /dev/log, and forgotten all about Docker Engine taking care of
synchronizing things as well as the proper formatting.

Hope this helps,
--
Olaf Meeuwissen, LPIC-2            FSF Associate Member since 2004-01-27
 GnuPG key: F84A2DD9/B3C0 2F47 EA19 64F4 9F13  F43E B8A4 A88A F84A 2DD9
 Support Free Software                        https://my.fsf.org/donate
 Join the Free Software Foundation              https://my.fsf.org/join