GLUELOG
=======

Gluelog is a small program for replacing syslogd.  It is based on a program
called sock-syslog and was originally intended for use with multilog from the
daemontools package by D.J. Bernstein.

Gluelog takes over /dev/log and writes anything sent to it to stdin of another
process which is then responsible for logging.

Gluelog also set its uid to "daemon" before it does anything useful.  This can
be configured in the source by changing the value of RUNUSER at the top of the
source file.

Gluelog takes only one argument: The command line of another program which
reads from Stdin.

You can use gluelog to log to anything that has the ability to read from stdin.

Example
=======

Send all system logs to the multilog program:
	gluelog multilog t /var/log/messages

Install
=======

Typing just "make" should compile it just fine.  Afterwards, copy the file to a
convenient spot in your path (I use /usr/local/sbin), and modify the bootup scripts to call
that instead of the usual syslogd (On Redhat Linux, you need to edit
/etc/rc.d/init.d/syslog).

Advantages and disadvantages
============================

Using gluelog with multilog has the advantage that no log rotation needs to be done.  Multilog
auto-rotates logs as it goes along, therefore releaving you from running a cron daemon
on a box which doesn't need it for anything else but log rotation.

Neither gluelog nor multilog (to the best of my knowledge) calls sync() after text
is logged.  This means that if the box goes down or crashes due to some problem and the
logged text was not written to the disk yet, you may loose it.  It does however provide
a performance advantage.

The Code
========

The code consists of one file with one huge main() in it.  If you can think of any reason
to split it up into more procedures, feel free to do so :)

In the meantime, you can mail me at gpf@linuxuser.co.za