CFMX TIP - Linux :: Rotate Your Log Files
Andrew Powell
Even a moderately busy server logs a lot of information. The quantity of information stored in the log files is very large, not to mention also somewhat verbose. ColdFusion tries to alleviate this by splitting its info into many different logfiles. Over time, these log files can grow quite large and become very difficult to manage.
Linux offers us a soltuion to this: logrotate.
Logrotate runs as a daily cron job and behaves as it is told to, on any log file it is told to act upon. You can alter /etc/logrotate.conf to specify which log file to rotate and what to do when rotating that log. Log rotate allows you to act either on a schedule or when a logfile reaches a certain size. You can also compress rotated logs for space concerns. All options are configurable within logrotate.conf.
Rotating your logs will keep your log files at a reasonable and manageable size, will take up less space, and, most importantly, will be easier to read. This will allow you to diagnose any issues you may have much quicker than if you hadn't rotate your logs.
Interested in more detail on how to rotate your log files?
Read this article.
Posted in ColdFusion | General | Linux | Adobe |
0 comments