Re: [syslog-ng]rotation log for syslog-ng
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érôme
Jerome (sorry, no accents on my keyboard), Syslog-ng in the latest 1.5 versions can handle log rotation in the 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 minus 1 day . Example: destination warn { file("/var/log/warn.$WEEKDAY" remove_if_older(432000)); }; filter f_allwarnings { level(warn..emerg); }; log { source(src); source(kernel); filter(f_allwarnings); destination(warn); }; For more advanced log rotation, you will need to use the usual log rotation scripts/daemons. Groetjes, Klaas van Gend
participants (1)
-
klaas.vangend@philips.com