Forum Moderators: phranque

Message Too Old, No Replies

access.log

         

Leys

11:11 am on Jan 27, 2004 (gmt 0)

10+ Year Member



Hi,

I run a win2k advanced server with apache.

I have a question about the access.log file.

Is it possible for me to let it automaticly rename the access.log file very week to accessDAYMONTHYEAR.log?

Leys

11:13 am on Jan 27, 2004 (gmt 0)

10+ Year Member



I have tried doing this, but it cannot rename the file when apache is running. THis means i have to shut down apache, rename the file by hand and start apache so it creates another new access.log...

is this not possible on an automaticly way?

Only way i can think of is making a macro that emulates the user mouse and keyboard clicks? Maybe im newbie :-)

jdMorgan

6:08 am on Jan 28, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Leys,

I can't answer your question, but the generally-related subject of "rotating log files" comes up fairly often. This is usually done using cron jobs, so it must be "automatable."

A search on WebmasterWorld or on the web for those phrases and their variants might be helpful.

Jim

bakedjake

6:12 am on Jan 28, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



You use a pipe in apache, and write your own handler.

If you're not in a programming mood, cronolog (at cronolog.org) is designed to do exactly what you're trying to do, chief. And they have a Win32 version.

Once you get cronolog installed, it's easy:

CustomLog "¦/usr/sbin/cronolog /web/logs/access%d%m%Y.log"

That's for UNIX, but just change the paths as necessary for Win32.

Leys

7:28 pm on Jan 29, 2004 (gmt 0)

10+ Year Member



thanks for the help guys! :)