Uploaded image for project: 'Log4php'
  1. Log4php
  2. LOG4PHP-185

Don't clear the entire stat cache on an append

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.3.0
    • None
    • None

    Description

      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) {

      Attachments

        Activity

          People

            juice Ivan Habunek
            rlerdorf Rasmus Lerdorf
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: