[ 
https://issues.apache.org/jira/browse/LOG4PHP-26?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12746071#action_12746071
 ] 

Christian Grobmeier commented on LOG4PHP-26:
--------------------------------------------

Please see: https://issues.apache.org/jira/browse/LOG4PHP-71

Other processes (apache processes) need to wait until the file is unlocked. 
With flock (which is partially already implemented in the old versions) we have 
a file lock implementation. I would think that resolving LOG4PHP-71 resolves 
this issue too. Other file locking than flock seems odd to me.

flock does support  LOCK_NB mode, but this will not work on windows.

Before having a not portable feature, I would think: leave it out, use flock to 
lock to manage mostly "nonblocking" writes and don't care, if other processes 
open the file.

PLease see:
http://blog.grobmeier.de/2009/08/21/performance-ofnonblocking-write-to-files-via-php.html

> Add file locking to file appenders
> ----------------------------------
>
>                 Key: LOG4PHP-26
>                 URL: https://issues.apache.org/jira/browse/LOG4PHP-26
>             Project: Log4php
>          Issue Type: New Feature
>          Components: Code
>            Reporter: Knut Urdalen
>            Assignee: Knut Urdalen
>             Fix For: 2.0
>
>
> We should add file locking to all file appenders in order to prevent two or 
> more processes accessing the same file at once which may lead to corrupt log 
> files.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to