LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   log files house keeping (https://www.linuxquestions.org/questions/linux-general-1/log-files-house-keeping-936850/)

Frustin 03-28-2012 05:50 AM

log files house keeping
 
i've got an app running on this server and it's log files are getting too heavy. i dont want to delete them all, but i'd like to do something like the system does with /var/log/syslog

e.g.
1. allow the <file>.log to grow to a certain size
2. then copy it to another file like: <file>.log.1
3. Empty the original log
4. Keep creating up to .log.3
5. deleting all other logs after that point

catkin 03-28-2012 06:07 AM

logrotate can be configured to do that. Have a look in /etc/logrotate.d for samples


All times are GMT -5. The time now is 02:08 AM.