Forum Moderators: phranque

Message Too Old, No Replies

Rotating Logs files

         

Lastwords

11:49 am on Jul 3, 2007 (gmt 0)

10+ Year Member



If I use vhosts what is the best way to rotate logs in a format like access_logs.2007.06.03, so that a new file is created each day?

coopster

2:42 pm on Jul 3, 2007 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



The Apache docs on Log Rotation [httpd.apache.org] offers some ideas.

Lastwords

4:15 pm on Jul 3, 2007 (gmt 0)

10+ Year Member



I checked there but it doesn't help with what I want to do. Which is create a new log each day with the date stamped onto the log file, like error_log.2007.06.03 or something similar.

Matt Probert

4:54 pm on Jul 3, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You want help from a Unix guru, combined with a daily cron job.

Matt

Lastwords

5:25 pm on Jul 3, 2007 (gmt 0)

10+ Year Member



Yeah that's become evident. I have began working on a script which will go into cron.daily. It's just not working at the moment.