[syslog-ng]rotation log for syslog-ng
klaas.vangend@philips.com
klaas.vangend@philips.com
Wed, 24 Apr 2002 09:43:38 +0200
> Hello,
> i am trying to use syslog-ng.
> Could anyone brievely explain me how to have rotation log ?
> I can find any document about that. Is it possible ?
> Haw can i fixe the size of the files, and how can i specifie
> the number of files i want ?
> Thanks
> --
> J=E9r=F4me
Jerome (sorry, no accents on my keyboard),
Syslog-ng in the latest 1.5 versions can handle log rotation in the=20
following way:
* use macros to create logs per weekday or monthday
* remove a log file if it is older (i.e. not written to) than one week=20
minus 1 day .
Example:
destination warn { file("/var/log/warn.$WEEKDAY"=20
remove=5Fif=5Folder(432000)); };
filter f=5Fallwarnings { level(warn..emerg); };
log { source(src); source(kernel);=20
filter(f=5Fallwarnings); destination(warn); };
For more advanced log rotation, you will need to use the usual log=20
rotation scripts/daemons.
Groetjes,
Klaas van Gend