You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4php-dev@logging.apache.org by "Dennis Korbar (JIRA)" <ji...@apache.org> on 2009/03/27 12:16:51 UTC

[jira] Created: (LOG4PHP-24) LoggerAppenderRollingFile unable to rollover

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.


[jira] Resolved: (LOG4PHP-24) LoggerAppenderRollingFile unable to rollover

Posted by "Christian Grobmeier (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LOG4PHP-24?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Christian Grobmeier resolved LOG4PHP-24.
----------------------------------------

    Resolution: Fixed

Committed revision 769426.
Thanks!

> LoggerAppenderRollingFile unable to rollover
> --------------------------------------------
>
>                 Key: LOG4PHP-24
>                 URL: https://issues.apache.org/jira/browse/LOG4PHP-24
>             Project: Log4php
>          Issue Type: Bug
>          Components: Code
>         Environment: Microsoft Windows XP
> PHP 5.2.8
>            Reporter: Dennis Korbar
>            Priority: Blocker
>             Fix For: 2.0
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> 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.


[jira] Updated: (LOG4PHP-24) LoggerAppenderRollingFile unable to rollover

Posted by "Knut Urdalen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LOG4PHP-24?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Knut Urdalen updated LOG4PHP-24:
--------------------------------

    Component/s: Code

> LoggerAppenderRollingFile unable to rollover
> --------------------------------------------
>
>                 Key: LOG4PHP-24
>                 URL: https://issues.apache.org/jira/browse/LOG4PHP-24
>             Project: Log4php
>          Issue Type: Bug
>          Components: Code
>         Environment: Microsoft Windows XP
> PHP 5.2.8
>            Reporter: Dennis Korbar
>            Priority: Blocker
>             Fix For: 2.0
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> 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.