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

MagerValp MagerValp@cling.gu.se
Fri, 20 Apr 2001 11:03:24 +0200


>>>>> "SD" == Shawn Davenport <shawn.davenport@currenex.com> writes:

SD> Unfortunately I don't have the c knowledge to make that happen, so
SD> the best thing I've come up with is through the use of a few
SD> different syslog-ng.conf files and some perl to watch network
SD> connections. Kind of messy...

You can send messages to a program which receives the messages on
stdin using the pipe() destination. Simply add up the length of each
line you receive and rotate the log filenames when you hit your limit.
Perl would of course be ideal for this. Also, remember that programs
started by pipe() are only started once, and should have a while(<>)
loop or equivalient.

-- 
    ___          .     .  .         .       . +  .         .      o   
  _|___|_   +   .  +     .     +         .   .  Per Olofsson, konstnär
    o-o    .      .     .   o         +          MagerValp@cling.gu.se
     -       +            +    .     http://www.cling.gu.se/~cl3polof/