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: Problem doing a simple log rotation help !
Author
dcreatorx



Joined: 13 Aug 2007
Posts: 1

PostPosted: Mon 13 Aug '07 13:53    Post subject: Problem doing a simple log rotation help ! Reply with quote

Hello everybody ! Nice to be here with you all ! I've got a problem, I'm trying to do a log rotation and I can't get it done. I'm an Apache newbie and I'm at job! This is a real case so please help me! This is the part of the log code and you will see I'm following the example on Apache documentation, but I can't get it to work. Thank you in advance !

# ErrorLog: The location of the error log file.
# If you do not specify an ErrorLog directive within a <VirtualHost>
# container, error messages relating to that virtual host will be
# logged here. If you *do* define an error logfile for a <VirtualHost>
# container, that host's errors will be logged there and not here.
#
ErrorLog D:/Logs/Apache/error.log

#
# LogLevel: Control the number of messages logged to the error_log.
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
#
LogLevel warn

<IfModule log_config_module>
#
# The following directives define some format nicknames for use with
# a CustomLog directive (see below).
#
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common


<IfModule logio_module>
# You need to enable mod_logio.c to use %I and %O
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
</IfModule>

CustomLog "|C:\Program Files\Apache Software Foundation\Apache2.2\bin\rotatelogs.exe D:\Logs\Apache\acces.log 500" common

#
# The location and format of the access logfile (Common Logfile Format).
# If you do not define any access logfiles within a <VirtualHost>
# container, they will be logged here. Contrariwise, if you *do*
# define per-<VirtualHost> access logfiles, transactions will be
# logged therein and *not* in this file.
#
CustomLog D:/Logs/Apache/access.log common

#
# If you prefer a logfile with access, agent, and referer information
# (Combined Logfile Format) you can use the following directive.
#
#CustomLog logs/access.log combined
</IfModule>
Back to top
James Blond
Moderator


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

PostPosted: Tue 14 Aug '07 15:48    Post subject: Reply with quote

You have defined the CustomLog twice! Only the one with the rotatelog. Than it should do. Comment the second one out.


Btw, why not use http://www.hexten.net/mod_log_rotate/ ?

Steffen
Back to top


Reply to topic   Topic: Problem doing a simple log rotation help ! View previous topic :: View next topic
Post new topic   Forum Index -> Apache