Tuesday, May 6, 2014
0 comments
undefined
undefined
Md. Mahidul HasanHow to rotate your application logs
How to rotate your application logs
Concept:
We use system's logrotate script to rotate our services logs. This (/etc/logrotate.conf) is a default script of the system which is executed by cronjob (/etc/cron.daily/logrotate) for log rotation. So, logration script and cronjob is already prepared by system, all we need to do is create a new file on (/etc/logrotate.d/) directory for our application and declair our requirement as below-
[root@db1 ~]# vim /etc/logrotate.d/asterisk
/var/log/asterisk/call.log {
#If the log file is...
Subscribe to:
Posts (Atom)