note 50404 rejected from function.gzwrite by nlopess
| From: | nlopess@php.net | Date: | Sun, 27 Feb 2005 12:25:45 +0000 |
| Subject: | note 50404 rejected from function.gzwrite by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-85632@lists.php.net to get a copy of this message | ||
Note Submitter: xperience at poczta dot interia dot pl
----
I have question.
i have simple function to do basic debug logging ie:
function do_log($log_string)
{
$fp = gzopen("log.gz","a")
gzwrite($fp, $log_string, strlen($logstring));
gzclose($fp);
}
Function do_log is called periodically when we need to log something, all works fine, it appends a
line to a log file, but length of log.gz is almost that same or even bigger than original file size.
What can be done to have better efficiency. I tried to use gz functions to save hdd space.