[
https://issues.apache.org/jira/browse/LOG4PHP-185?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Ivan Habunek closed LOG4PHP-185.
--------------------------------
Resolution: Fixed
Fix Version/s: (was: 2.2.1)
2.3.0
Assignee: Ivan Habunek
Done and committed to trunk.
> Don't clear the entire stat cache on an append
> ----------------------------------------------
>
> Key: LOG4PHP-185
> URL: https://issues.apache.org/jira/browse/LOG4PHP-185
> Project: Log4php
> Issue Type: Improvement
> Reporter: Rasmus Lerdorf
> Assignee: Ivan Habunek
> Fix For: 2.3.0
>
>
> As of PHP 5.3.0 you can selectively clear individual entries from the stat
> cache. So, I suggest this change:
> Index: src/main/php/appenders/LoggerAppenderRollingFile.php
> ===================================================================
> --- src/main/php/appenders/LoggerAppenderRollingFile.php (revision
> 1379664)
> +++ src/main/php/appenders/LoggerAppenderRollingFile.php (working copy)
> @@ -195,7 +195,7 @@
> }
>
> // Stats cache must be cleared, otherwise filesize()
> returns cached results
> - clearstatcache();
> + clearstatcache(true, $this->file);
>
> // Rollover if needed
> if (filesize($this->file) > $this->maxFileSize) {
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira