apache delayed log write ?

This is a discussion on apache delayed log write ? within the Linux Web Servers forums, part of the Web Server and Related Forums category; Hi all, I'm wondering if it's possible to delay write of CustomLog directive instead of writting to file ...


Go Back   Usenet Forums > Web Server and Related Forums > Linux Web Servers

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 03-02-2008
damcey@gmail.com
 
Posts: n/a
Default apache delayed log write ?

Hi all,

I'm wondering if it's possible to delay write of CustomLog directive
instead of writting to file as soon as request is made ? I believe it
should be possible to pipe data to external program that will store
log in buffer and then write it after a delay, say every 10 seconds
but I'm not aware of program that is able to do this. Any help is
appreciated.

Thanks.
Mendok
  #2 (permalink)  
Old 03-15-2008
sean dreilinger
 
Posts: n/a
Default Re: apache delayed log write ?

damcey@gmail.com wrote:
> I'm wondering if it's possible to delay write of CustomLog directive
> instead of writting to file as soon as request is made ? I believe it
> should be possible to pipe data to external program that will store
> log in buffer and then write it after a delay, say every 10 seconds
> but I'm not aware of program that is able to do this. Any help is


buffered logging is already available in apache.

for apache 2.0.41+ and newer, buffered logging is a mod_log_config configuration
option that you can enable via httpd.conf:

http://httpd.apache.org/docs/2.2/mod...l#bufferedlogs

The BufferedLogs directive causes mod_log_config to store several log
entries in memory and write them together to disk, rather than writing
them after each request. On some systems, this may result in more
efficient disk access and hence higher performance. It may be set only
once for the entire server; it cannot be configured per virtual-host.

for apache 1.3b2 -> 2.0.40, you can probably enable log buffering in httpd.h by
setting:
#define BUFFERED_LOGS
or by adding -DBUFFERED_LOGS as a flag to your c compiler.

hth
--sean

--
sean dreilinger - http://durak.org/sean/
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 10:04 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0