note 93070 added to function.error-log

From: Date: Fri, 21 Aug 2009 16:33:01 +0000
Subject: note 93070 added to function.error-log
Groups: php.notes 
Request: Send a blank email to php-notes+get-159756@lists.php.net to get a copy of this message
This method is as performant as file_put_contents is. That leads me to the opinion that this one is behaving like fopen, fwrite, fclose for each call. That makes it very slow and imho not very usable for logging. Better option then this is to open the file, lock it flock, write and unlock it. If you have a new logging event, you should lock it again. End of request is fclose. This is how it will work in Log4PHP now. More to this benchmark can be found on my blog: http://tiny.cc/phpwrite ---- Server IP: 209.41.74.194 Probable Submitter: 84.155.201.126 ---- Manual Page -- http://www.php.net/manual/en/function.error-log.php Edit -- https://master.php.net/note/edit/93070 Del: integrated -- https://master.php.net/note/delete/93070/integrated Del: useless -- https://master.php.net/note/delete/93070/useless Del: bad code -- https://master.php.net/note/delete/93070/bad+code Del: spam -- https://master.php.net/note/delete/93070/spam Del: non-english -- https://master.php.net/note/delete/93070/non-english Del: in docs -- https://master.php.net/note/delete/93070/in+docs Del: other reasons-- https://master.php.net/note/delete/93070 Reject -- https://master.php.net/note/reject/93070 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#159756) next »