Where should I keep my log files?
3 answers
Assuming you are using a Linux based web server, write your logs to a simple log file and run a bzip cron job every day. You can bzcat file to get its contents. The same cron script could delete files older than a given threshold, or you could delete old logs manually. This is a fairly acceptable scheme that most daemons use directly or indirectly via syslog.
Be sure to write the log file outside the public web root, or people might guess your log file names and download potentially revealing data.
+1
source to share