[Initng] IRC meeting
wasabi at larvalstage.net
Fri Nov 30 20:39:42 GMT 2007
A simple shell script could accomplish this:
daemon | while read line; do logger "$line"; done
On Wed, 2007-11-28 at 01:08 +0100, Eric MSP Veith wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> sorry for just popping in; there's something I want to say about logging. I
> heavily use Dan Berstein's Qmail and Tinydns. As you might know, they do
> not implement any syslog() call or logging functionality at all. Logging is
> done via Bernstein's daemontools, where you can create a "log" service for
> each daemon you start. Messages to stdin/stderr will be collected by this
> seperately monitored logging daemon, which then does whatever you
> configured it to do (e.g., from just handing it over to syslog over logging
> it to a separate file with the tai64 time format to transmitting it over
> I, personally, like the idea. Nobody has to care about logging at all when
> he writes a daemon. You are never urged to implement again and again a good
> way to communicate to syslog or write your own log files with all the
> careful checks you normally do when writing the logging part of your
> program. You just printf() it. That's all.
> If an init system ever needs extra functionality, then its logging. It
> wouldn't be much: Collecting everything the programs prints to stdout or
> stderr, queuing it until syslog is up and running and handing it over.
> I'd really appreciate some kind of logging functionality in the init system
> I use. Not only could I eventually integrate qmail/tinydns/dnscache with
> the rest, I'd also know for sure that my log messages are really recorded
> where I find them.
> Just IMHO, of course. :-)
> On Tuesday 27 November 2007, Scott James Remnant <scott at netsplit.com> wrote:
> > > > Logging ... Err, we have perfectly good logging daemons in Linux
> > > > already
> > > > - why invent another and why build it into pid#1 ?
> > >
> > > Well, there's no reason to implement it, but there's no general
> > > facility for that InitNG, that's why it says "Limited". I like to
> > > have a generic interface for this just because some embedded systems do
> > > not have syslog, in these cases it could be replaced by a simplistic
> > > logging plug-in.
> > All systems can have syslog() it's in the libc, and there are various
> > daemon implementations -- many of which are small enough for embedded
> > uses.
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.7 (GNU/Linux)
> -----END PGP SIGNATURE-----
More information about the upstart-devel