Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: Example of rotatelogs (or cronolog) on Windows |
|
Author |
|
flatcircle
Joined: 27 Jun 2006 Posts: 79
|
Posted: Mon 18 Sep '06 16:28 Post subject: Example of rotatelogs (or cronolog) on Windows |
|
|
Hello,
Does somebody use rotatelogs.exe or cronolog.exe on Apche/Windows?
I have tried every switch and parameter but can't get any of these 2 log rotators to work.
CustomLog "|bin/rotatelogs /var/logs/logfile 5M" common
CustomLog "|C:/path/to/bin/rotatelogs /var/logs/logfile 5M" common
CustomLog "|C:/path/to/bin/rotatelogs C:/logs/logfile 5M" common
Tried almost everything...nothing works
Does someone have a (working) example? |
|
Back to top |
|
Steffen Moderator
Joined: 15 Oct 2005 Posts: 3091 Location: Hilversum, NL, EU
|
Posted: Mon 18 Sep '06 16:46 Post subject: |
|
|
Yep, try to specifify the time between log file rotations in seconds.
Example every hour:
CustomLog "|c:/apache2/bin/rotatelogs.exe c:/apache2/logs/test.log 3600" common
Btw, why not use http://www.hexten.net/mod_log_rotate/ ?
Steffen |
|
Back to top |
|
flatcircle
Joined: 27 Jun 2006 Posts: 79
|
Posted: Tue 19 Sep '06 14:22 Post subject: Almost there |
|
|
Hello,
Seems like Cronolog is working now.
I use following line in httpd.conf:
CustomLog "|bin/cronolog.exe logs/%Y/%m/%d/access.log" common
Everything works.
However, I want to store my log files on my D-drive, so I use:
CustomLog "|bin/cronolog.exe d:/logs/%Y/%m/%d/access.log" common
Restarted Apache without problems but nothing is written on my D-drive.
In my error.log I see:
'piped log program 'bin/cronolog.exe d:/logs/%Y/%m/%d/access.log' failed unexpectedly'
Permissions on this folder are ok. Something wrong with the syntax (or quotes) in my Customlog line?
Regards. |
|
Back to top |
|
|
|
|
|
|