Ian Jackson <ijack...@chiark.greenend.org.uk> writes: > Steve Langasek writes:
>> It would be a straightforward incremental change on top of the existing >> logging support in Upstart. I'm not sure it's such a great idea to >> have some logs going to /var/log/upstart and some going via syslog, >> however; the resulting user/admin confusion may outweigh any benefit >> from supporting syslog. > Perhaps it would be possible to have a global setting that changes the > effect of "log console" to use syslog. Take a look at the systemd support for how to direct the logs. (It's in systemd.exec(5).) It's quite nice: you can choose whether to log or discard stdout and stderr independently, you can set the syslog priority and (more importantly) facility, and you can prefix each line of output with some identifier. You can also do a bunch of other stuff with standard output and standard error for which I don't have as much immediate need, but which looks rather nice, such as sending output to both the console and syslog, logging to a tty, logging to a socket, etc. systemd provides enough facilities to fully replace the daemontools logging infrastructure plus some, so you can use it to run daemons that were designed to log to standard output and standard error and direct those logs to syslog (instead of djb's multilog, which is a nice idea but which doesn't play well with central infrastructure). That means that, for small homegrown stuff, you don't have to bother to add explicit syslog code and a switch saying whether to use syslog or stdout/stderr; you can just handle it all in the unit configuration. -- Russ Allbery (r...@debian.org) <http://www.eyrie.org/~eagle/> -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org