[syslog-ng]log rotation

Andan Lauber andan@redback.com
Fri, 24 Aug 2001 12:59:01 -0700


On Fri, Aug 24, 2001 at 10:59:46AM -0500, Joseph K Gainey wrote:
> 
> syslog-ng allows me to to complex filtering and logging, because
> of this I get several different log files instead of one huge
> monolithic syslog.  Is there anyway to have syslog-ng automatically
> rotate the logs base on size and/or time?
> Joe

i'm using syslog-ng 1.4.12 on a NetBSD 1.5.x host, and i was able to teach
the newsyslog utility to rotate my logs.  so, i can apply all the rules that
newsyslog knows about, including age and size.

all i did was hack up newsyslog.conf to reflect the new logs i was making
(i'm putting them all in /var/log-ng while i fool around and decide how i
-really- wanna implement), and make sure syslog-ng gets the -p <pidfilename>
option at start in /etc/rc.conf, like so:

syslogd=YES syslogd_flags="-p /var/run/syslogd.pid"

the /usr/sbin/syslogd on my system is:
 /usr/sbin/syslogd@ -> /usr/local/sbin/syslog-ng

so all my system default init scripts in /etc/rc.d, continue to work fine.

for other OS, YMMV, but something similar is prolly implementable.

-- 
Andan Lauber 					Redback Networks, Inc.
Daemonologist					http://www.redback.com