modify syslog-ng.conf to add limit of log file size and log rotate option

5.3k views Asked by At

I have modified /etc/syslog-ng/syslog-ng.conf file to create my own log file at different location using below changes :

source s_src {
       system();
       internal();
};

 destination d_syslog { file("/home/abc/test_log"); };

log{ source(s_src); destination(d_syslog); };

what should i do to limit this file size to 1MB , and once it reaches 1MB it should be converted to test_log.0 and new logs should be in test_log ?

Thanks in Advance , Asit .

1

There are 1 answers

2
Robert Fekete On

currently you cannot limit the size of logfiles in syslog-ng. You can either