You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by christopher justin <ch...@hotmail.com> on 2003/04/28 20:32:26 UTC
file locking log files ?
hi list,
In looking at http_log.c and alloc.c , I don't see any code that actually
does file locking when logging to log files. Does the logging mechanism
lock the standard log files before writing ?
I am writing an Apache module that needs to do its own custom Log format.. I
was hoping the Apache logging API provided file locking so that I do not
have to worry about it.
If there is locking that I cannot find in the code, how is the file locking
different from Version 1.3.x to 2.x?
thanks for any help.
_________________________________________________________________
Protect your PC - get McAfee.com VirusScan Online
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
Re: file locking log files ?
Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
Files open for APPEND, write on unix should write atomically to the file.
On Win32 in apr/file_io for Apache2 we set up our own locking to do the
same sort of thing. As far as cross-machine locking, I dunno, but this
has historically been sufficient for one machine/cross-process log files.
Bill
At 01:32 PM 4/28/2003, christopher justin wrote:
>hi list,
>
>In looking at http_log.c and alloc.c , I don't see any code that actually does file locking when logging to log files. Does the logging mechanism lock the standard log files before writing ?
>
>I am writing an Apache module that needs to do its own custom Log format.. I was hoping the Apache logging API provided file locking so that I do not have to worry about it.
>
>If there is locking that I cannot find in the code, how is the file locking different from Version 1.3.x to 2.x?
>
>thanks for any help.
>
>_________________________________________________________________
>Protect your PC - get McAfee.com VirusScan Online
>http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
>