syslog, redirect logging on multiple files with custom name
Hi all,
I would need to store logging files such as /var/log/messages, /var/log/kern.log (and maybe some more) also into a custom folder, not only into the standard folder /var/log/, and to not deleted the files into this custom folder for at least one or 2 weeks.I would be perfect If I could rename each file depending on the date (or basic enumeration), which is the most important.
I am working on an Angstrom distribution, and I tried to modify the configuration file /etc/syslog-ng.conf.
The 'problem' is that If I define a new output file (e.g. for the kern facility), the /var/log/kern.log file is not used any more, so I cannot store the log on two different files at the same time. And I cannot rename automatically the files depending on the date from the /etc/syslog-ng.conf file.
There is a utility useful to make this work easier ?
Or there is a way to accomplish this from /etc/syslog-ng.conf and I missed it ?
Making a copy of the log files is a bad idea, because if the system will be powered off, I would loose many log data.
I am in doubt..
Thank you in advance for your suggestions.
simon
Last edited by mr.simo; 05-04-2015 at 05:46 AM.
Reason: title
|