LoggerAppenderRollingFile unable to rollover
--------------------------------------------

                 Key: LOG4PHP-24
                 URL: https://issues.apache.org/jira/browse/LOG4PHP-24
             Project: Log4php
          Issue Type: Bug
         Environment: Microsoft Windows XP
PHP 5.2.8
            Reporter: Dennis Korbar
            Priority: Blocker


LoggerAppenderRollingFile can only rollover one time, after that the filename 
property will be empty. This is caused by the realpath() function being used, 
when the file it is used on, is currently not existing (because it has been 
renamed to <filename>.1).

I created a small patch to resolve this issue

Index: LoggerAppenderRollingFile.php
===================================================================
--- LoggerAppenderRollingFile.php       (revision 759099)
+++ LoggerAppenderRollingFile.php       (working copy)
@@ -149,9 +149,9 @@
             rename($file, $target);
         }
         
-        $this->setFile($fileName, false);
         unset($this->fp);
         $this->activateOptions();
+        $this->setFile($fileName, false);
     }
     
     function setFileName($fileName)


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