If detailed debugging has to run for a number of days or weeks, use
logrotate to rotate and compress log files automatically.
Refer to the logrotate man page for details on logrotate.Procedure
- Use a text editor such as
vi, open/etc/logrotate.d/rsyslog.
WARNING
Making incorrect changes to a configuration file can cause serious system errors. Before you start, back uptmsplx.xmlin case you need to restore your original settings. - Add the following lines to rotate logs:
/var/log/messages /{path}/{splxlog} { sharedscripts postrotate /usr/bin/systemctl kill -s HUP rsyslog.service > /dev/null 2>&1 || true endscript } - Save and close the
rsyslogfile.
