kurt-vd / logcollectd

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

logcollectd

This is a stderr-to-syslog collector.

How does it differ from logger (1) and quite many others?

I wanted to avoid creating subprocesses for every service in order to capture their stderr and forward to syslog.

So instead, I run logcollectd once. It does not do anything alone.

For every stderr to capture, I prepend logcollect -t SOMENAME before the command. logcollect will create a pipe (2) and send the reading end to logcollected who will do the reading. logcollect sets the writing end of the pipe as stdout and stderr and execvp (2) the service.

logcollectd reads many pipes, prefixes a syslog header, and sends the packets to syslog directly, bypassing the libc's syslog function. This is necessary since each pipe's data must be logged with a different tag name.

About

License:GNU General Public License v3.0


Languages

Language:C 93.2%Language:Makefile 6.8%