You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by sn...@cob.org on 2006/10/11 17:35:37 UTC

[users@httpd] Access log time/date range

I've configured Apache 2.2.2 to create an access log in combination with
log_rotate_module to switch it out.  I'm trying to get the access log files
to contain only the entries for a particular day.  My current logging
appears to group everything from 5pm the previous day to 5pm the next day.
I'm guessing there's some sort of setting to adjust this, but have searched
the Apache manual and Googled the log_rotate_module and haven't found a
solution yet.  Here's my config and a sample of an access log entry:

**************************************vhosts
config****************************************

IfModule log_config_module>
    LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\"
\"%{User-Agent}i\"" combined
    CustomLog /cob/cob-access-log-%Y-%m-%d.log combined
</IfModule>

<IfModule log_rotate_module>
    RotateLogs On
    RotateLogsLocalTime On
    RotateInterval 86400
</IfModule>

****sample beginning and ending access log entries from the same access log
file***

192.168.1.1 - - [09/Oct/2006:17:05:09 -0700] "GET / HTTP/1.1" 302 - "-"
"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322;
InfoPath.1)"

192.168.1.1 - - [10/Oct/2006:16:59:57 -0700] "GET /gramps HTTP/1.1" 200 218
"-" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322;
InfoPath.1; .NET CLR 2.0.50727; InfoPath.2)"


Thanks in advance for any help you can send my way.

____________________________
Steven Niedermeyer
Bellingham, WA


---------------------------------------------------------------------
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-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Access log time/date range

Posted by Georgi Chorbadzhiyski <gf...@unixsol.org>.
sniedermeyer@cob.org wrote:
> I've configured Apache 2.2.2 to create an access log in combination with
> log_rotate_module to switch it out.  I'm trying to get the access log files
> to contain only the entries for a particular day.  My current logging
> appears to group everything from 5pm the previous day to 5pm the next day.
> I'm guessing there's some sort of setting to adjust this, but have searched
> the Apache manual and Googled the log_rotate_module and haven't found a
> solution yet.  Here's my config and a sample of an access log entry:
> 
> **************************************vhosts
> config****************************************
> 
> IfModule log_config_module>
>     LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\"
> \"%{User-Agent}i\"" combined
>     CustomLog /cob/cob-access-log-%Y-%m-%d.log combined
> </IfModule>
> 
> <IfModule log_rotate_module>
>     RotateLogs On
>     RotateLogsLocalTime On
>     RotateInterval 86400
> </IfModule>

Well, this instructs the module to rotate logs once per day. If you start the server
at 5 AM, everyday at 5 AM logs will be rotated.

May http://cronolog.org/ will offer you a beter solutions to logs rotation.

-- 
Georgi Chorbadzhiyski
http://georgi.unixsol.org/

---------------------------------------------------------------------
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-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org