logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

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.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Rotatelogs issue
Author
awdboxer



Joined: 11 Feb 2010
Posts: 9

PostPosted: Fri 26 Feb '10 18:00    Post subject: Rotatelogs issue Reply with quote

I'm having a couple issues with rotatelogs on my Win2k8 servers running Apache 2.2.14. First off, depending on the number of hits the logs can sometimes get up to, or over, 300mb. Can I have 2 different options in there so it starts a new log when it reaches 25MB and after 24hrs?

Code:
ErrorLog "|bin/rotatelogs C:/weblogs/domains/brazil-fscampus-stage.com-error_log.%Y-%m-%d-%H_%M_%S 86400"
CustomLog "|bin/rotatelogs C:/weblogs/domains/brazil-fscampus-stage.com-access_log.%Y-%m-%d-%H_%M_%S 86400" combined


I was also wondering what the 'combined' offset is and should I use 'common' instead...does it really matter?

Thanks for any help!
Back to top
awdboxer



Joined: 11 Feb 2010
Posts: 9

PostPosted: Wed 03 Mar '10 16:56    Post subject: Reply with quote

Nobody uses rotatelogs??
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7407
Location: EU, Germany, Next to Hamburg

PostPosted: Wed 03 Mar '10 17:23    Post subject: Reply with quote

I use mod_log_rotate since rotatelogs did not work for me either. bad about rotatelogs it can't handle the error log.
Back to top
black_harry



Joined: 22 Feb 2010
Posts: 15
Location: Germany, Stuttgart

PostPosted: Thu 04 Mar '10 21:26    Post subject: Rotatelogs Reply with quote

As the command line options say, rotatelogs can either handle a switch for the filesize or for the time.
cronolog behaves in the same way. So:
Have you thought about rotating the log after 3600 seconds, e.g.

ErrorLog "|bin/rotatelogs C:/weblogs/domains/brazil-fscampus-stage.com-error_log.%Y-%m-%d-%H 3600"

Usage of option combined instead of common: you have 2 additional fields in the logfile - you should find detailed information in the apache-manual (not too much to read):
http://httpd.apache.org/docs/2.2/logs.html

Usage of "rotatelogs" for access.log, error.log and https.log:
It works for me. My tests showed, Apache can handle only 1 piped log if you do not use the full path.
Example (I hope I recollected this correctly out of my mind):
CustomLog "|c:/apache2.2/bin/rotatelogs.exe C:/apache2.2/logs/access_%Y-%m-%d.log 86400" common
ErrorLog "|c:/apache2.2/bin/rotatelogs.exe C:/apache2.2/logs/error_%Y-%m-%d.log 86400"
https:
TransferLog .... (same as CustomLog, I do not know if you run into trouble if you do not specify a separate file.)

Hope this helps.
Back to top


Reply to topic   Topic: Rotatelogs issue View previous topic :: View next topic
Post new topic   Forum Index -> Apache