:: Re: [DNG] Everyone OK for using the…
Page principale
Supprimer ce message
Répondre à ce message
Auteur: Steve Litt
Date:  
À: dng
Sujet: Re: [DNG] Everyone OK for using the logger program for runit logging?
On Tue, 23 Oct 2018 11:06:52 +0200
Didier Kryn <kryn@???> wrote:

>     Logger is a way to redirect to syslog one of the output paths of
> an application, by the mean of a pipe, or for a script to send such
> messages. Logger reads messages and sends them by invoking the
> syslog() function. If you force a daemon to send its messages through
> stderr and redirect this stderr to the input of logger, you just add
> complexity and overhead and loose flexibility; better let the daemon
> invoke syslog() right away.


Ahh, the preceding explains why G. Pape says runit level logs are
required on *some* daemons, but not others. If the daemon already
performs meaningful syslog() calls, there's no reason for further
logging. The logger program is needed only for those daemons not
already doing syslog() calls. The set of programs not doing syslog
calls includes all my home-grown daemons: Being a longtime daemontools
guy, I just write warnings and errors to stderr and know
daemontools/runit/s6/perp will get them into the logs.

So Didier: I amend my question to this: Is logger the best log
mechanism to get stderr into the logs, for daemons not doing their own
syslog() calls?

Which means on a lot of services don't get runit level logs at all.
Which matches my Void Linux system, where 10 out of 71 daemons use a
log. But some of those are pretty important:

[root@mydesk sv]# ls -1dF */log
docker/log/
mysqld/log/
ndhc/log/
nmbd/log/
ntpd/log/
openntpd/log/
postgresql/log/
smbd/log/
sndiod/log/
socklog-unix/log/
[root@mydesk sv]#


Thanks,

SteveT

Steve Litt
September 2018 featured book: Quit Joblessness: Start Your Own Business
http://www.troubleshooters.com/startbiz