LOG4PHP-138: fixed the fix: of course not all appenders need the reference. Just...
authorChristian Grobmeier <grobmeier@apache.org>
Mon, 6 Jun 2011 10:05:47 +0000 (10:05 +0000)
committerChristian Grobmeier <grobmeier@apache.org>
Mon, 6 Jun 2011 10:05:47 +0000 (10:05 +0000)
git-svn-id: https://svn.apache.org/repos/asf/logging/log4php/trunk@1132572 13f79535-47bb-0310-9956-ffa450edef68

src/main/php/appenders/LoggerAppenderRollingFile.php

index e7a2df9..885a893 100644 (file)
@@ -226,38 +226,12 @@ class LoggerAppenderRollingFile extends LoggerAppenderFile {
                        if(flock($this->fp, LOCK_EX)) { 
                                if(ftell($this->fp) > $this->getMaxFileSize()) { 
                                        $this->rollOver(); 
-                                       $this->updateLoggers();
                                }
                        }
                }
        }
        
        /**
-        * Iterates through all loggers and updates all appenders with a new file name
-        */
-       private function updateLoggers() {
-               $appenders = Logger::getRootLogger()->getAllAppenders();
-               $this->updateAppenders($appenders);
-               $loggers = Logger::getAllLoggers();
-               foreach($loggers as $logger) {
-                       $appenders = $logger->getAllAppenders();
-                       $this->updateAppenders($appenders);
-               }
-       }
-
-       /**
-        * Updates all appenders with a new file name
-        */
-       private function updateAppenders($appenders) {
-               foreach($appenders as $appender) {
-                       if($appender instanceof LoggerAppenderRollingFile) {
-                               $appender->setFile($this->getFile());
-                               $appender->activateOptions();
-                       }
-               }
-       }
-       
-       /**
         * @return Returns the maximum number of backup files to keep around.
         */
        public function getMaxBackupIndex() {