[syslog-ng]circular logging & control structure based destination

Shawn Davenport shawn.davenport@currenex.com
Thu, 19 Apr 2001 22:09:17 -0700


Hey Folks,
Can syslog-ng do circular logging? If you are wondering what I mean by that,
I'm referring to writing messages to a file, and when the destination
reaches a limit, old messages are removed so the new ones can hang around
for a bit. The limit could be file size, message date or time, or something
else perhaps. For my needs, I would love to set a file size limit. Say
20megs per destination file. 

Also the idea of having the destination be chosen through a control
structure like an if/then statement is very appealing. The idea being, if
destination A is available (network connection, file w/ X amount of disk
space, etc) then log there, otherwise check destination B, or the next, and
so on... Having the destination be able to change dynamically would be
ideal. Unfortunately I don't have the c knowledge to make that happen, so
the best thing I've come up with is through the use of a few different
syslog-ng.conf files and some perl to watch network connections. Kind of
messy...

Thoughts, ideas, rude comments? Finding a way to do the first one, and
better way for the second would be great!

Thanks...
Shawn