# Apache log rollover?



## michaelsanford (Mar 29, 2003)

I presume /private/var/log/httpd/access_log and error_log are rolled over at some point?

When and how does this happen? Is the log file truncated, or is the whole thing just erased, or what?

What I'm interested in doing is adding support for dating my PHP counter (aCounter).

aCounter looks through access_log for instances of filenames, and if I can use some PHP function to date when the log file was rolled over, I can accurately say "xx visits since (logfile modification)".

But so far, no luck...

(FYI there's no PHP function to determine when a file was created...)


----------



## Darkshadow (Mar 29, 2003)

Actually, I dunno if the log files are ever rolled over.  I set up a monthly script to rotate 'em like the other logs are.  That lets cron do the job, and if you want to do it that way, you'll know exactly when it happens, since you know when the cron job is going to run


----------



## michaelsanford (Mar 29, 2003)

I was thinking the same thing actually, that is that the logs aren't rolled over...

I guess I'll just put $count visits since I installed Apache


----------



## Darkshadow (Mar 30, 2003)

How are you going about that, anyway?  'Cause you're gonna have to have some way to weed out the worm attacks, those aren't proper visits


----------

