Sysop:ServerSyslogNG

Aus immerda
Zur Navigation springen Zur Suche springen

syslog-ng is a very powerfull and good configurable system logger.

Homepage: http://www.balabit.com/products/syslog_ng/

Reference: http://www.balabit.com/products/syslog_ng/reference-1.6/syslog-ng.html/book1.html

Examples

I want to pipe the logs of a specific program (which normally lands in /var/log/message) to another file/location.

So just add the following lines:

destination foo { file("/location/file.log"); };
filter foo { program("bar"); };
log { source(src); filter(foo); destination(foo); flags(final); };

this directs logs from src (mostly added as source from /dev/log) throught the filter foo (which looks if the log is from program bar) and if it matches this filter it sends the log to destination foo which stores the log in /location/file.log