"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "framework/logging/CFileLogRoute.php" between
yii-1.1.23.445827.tar.gz and yii-1.1.24.a5ab20.tar.gz

About: Yii is a high-performance component-based PHP framework for developing large-scale Web applications. Hint: Yii 1.1 is now in maintenance mode.

CFileLogRoute.php  (yii-1.1.23.445827):CFileLogRoute.php  (yii-1.1.24.a5ab20)
skipping to change at line 58 skipping to change at line 58
/** /**
* @var string log file name * @var string log file name
*/ */
private $_logFile='application.log'; private $_logFile='application.log';
/** /**
* @var boolean Whether to rotate primary log by copy and truncate * @var boolean Whether to rotate primary log by copy and truncate
* which is more compatible with log tailers. Defaults to false. * which is more compatible with log tailers. Defaults to false.
* @since 1.1.14 * @since 1.1.14
*/ */
public $rotateByCopy=false; public $rotateByCopy=false;
/**
* @var integer the permission to be set for newly created log files.
* This value will be used by PHP chmod() function. No umask will be appl
ied.
* If not set, the permission will be determined by the current environme
nt.
*/
public $chmod;
/** /**
* Initializes the route. * Initializes the route.
* This method is invoked after the route is created by the route manager . * This method is invoked after the route is created by the route manager .
*/ */
public function init() public function init()
{ {
parent::init(); parent::init();
if($this->getLogPath()===null) if($this->getLogPath()===null)
$this->setLogPath(Yii::app()->getRuntimePath()); $this->setLogPath(Yii::app()->getRuntimePath());
} }
skipping to change at line 166 skipping to change at line 171
@flock($fp,LOCK_UN); @flock($fp,LOCK_UN);
@fclose($fp); @fclose($fp);
@file_put_contents($logFile,$text,FILE_APPEND|LOCK_EX); @file_put_contents($logFile,$text,FILE_APPEND|LOCK_EX);
} }
else else
{ {
@fwrite($fp,$text); @fwrite($fp,$text);
@flock($fp,LOCK_UN); @flock($fp,LOCK_UN);
@fclose($fp); @fclose($fp);
} }
if($this->chmod !== null)
@chmod($logFile, $this->chmod);
} }
/** /**
* Rotates log files. * Rotates log files.
*/ */
protected function rotateFiles() protected function rotateFiles()
{ {
$file=$this->getLogPath().DIRECTORY_SEPARATOR.$this->getLogFile() ; $file=$this->getLogPath().DIRECTORY_SEPARATOR.$this->getLogFile() ;
$max=$this->getMaxLogFiles(); $max=$this->getMaxLogFiles();
for($i=$max;$i>0;--$i) for($i=$max;$i>0;--$i)
 End of changes. 2 change blocks. 
1 lines changed or deleted 10 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)