Patrick,

For me, examples always help the most.
Here's what we do...

    TransferLog "| /usr/local/apache/bin/rotatelogs -l -f 
/var/adm/syslog/apache_access_log.%m-%d-%y-%I:%M:%S 86400"

This way, our apache_access_log filename is appended with the 
month-day-year-hour-minute-second... 
...and its rotated every 86400 seconds (once a day).  
You'll note we specify "-l", which means all processing is done in local time.

Here's an example of one of our apache_access_log filenames:

        /var/adm/syslog/apache_access_log.11-05-10-12:00:00 

hope this helps.

-tony

From: Patrick McCambridge [mailto:mcca...@fdny.nyc.gov] 
Sent: Friday, November 05, 2010 2:05 PM
To: users@httpd.apache.org
Subject: [us...@httpd] Rotating logs

Because I am not a Unix person or web developer, I am struggling with the 
exercise to rotate my logs in Apache (I am running 2.2).
 
When I add the following command to my httpd.conf file, it creates a file 
called access_log.old (in the time interval I designate), but Apache still 
continues to write to the original log.
 
Here is the command I am using:
CustomLog "|apache22/bin/rotatelogs /apache22/logs/archive_log 300" combine
 
How do I tweak this to ensure the new log that is created becomes the primary 
log, until it's time to replace it, and them it becomes archived?
 
Thank you in advance.
Patrick



Confidentiality Notice:
This message may contain information that is
confidential or privileged.

If you are not the intended recipient,
Please advise the sender immediately and delete this message. 

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
   "   from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org

Reply via email to