log to multilog instead of file
richard lucassen <[email protected]>
| Newsgroups | gmane.comp.djb.syslog |
|---|---|
| Organization | CAM S&C |
| Message-ID | <[email protected]> |
I have program X. X writes to syslogd, but is also able to log to a file with the -l option. X runs supervised and I want X to log through multilog. I now resolved this using a named pipe (daemontools-0.70): chmod 3755 /usr/local/sbin/X There is a user called "Xlog" /usr/local/sbin/X/run: #!/bin/sh exec 2>&1 exec X -l /var/log/X/log.fifo /usr/local/sbin/X/log/run: #!/bin/sh while true; do /usr/local/bin/setuidgid Xlog \ /usr/local/bin/multilog t /var/log/X done < /var/log/X/log.fifo But I'm afraid this is a rather dirty solution. Is there a solution that is more elegant than this one? Richard. -- ___________________________________________________________________ Recursion: see recursion +------------------------------------------------------------------+ | Richard Lucassen, Utrecht | | Public key and email address: | | http://www.lucassen.org/mail-pubkey.html | +------------------------------------------------------------------+
signature.asc
(application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFAtcblyG85G+teVsIRAiLMAKCiVJ3BeZ5wmwC3O38TUcAx+CrxUACfa2No zY0MmBHFsEO39thgnSNioA4= =/pPp -----END PGP SIGNATURE-----