mirror of
https://github.com/Seldaek/monolog.git
synced 2025-10-23 09:36:11 +02:00
Made the write method protected
Tests are not a good reason to make it public.
This commit is contained in:
@@ -52,19 +52,6 @@ class RotatingFileHandler extends StreamHandler
|
||||
parent::__construct($timedFilename, $level, $bubble);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function write(array $record)
|
||||
{
|
||||
// on the first record written, if the log is new, we should rotate (once per day)
|
||||
if (null === $this->mustRotate) {
|
||||
$this->mustRotate = !file_exists($this->url);
|
||||
}
|
||||
|
||||
parent::write($record);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
@@ -77,6 +64,19 @@ class RotatingFileHandler extends StreamHandler
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function write(array $record)
|
||||
{
|
||||
// on the first record written, if the log is new, we should rotate (once per day)
|
||||
if (null === $this->mustRotate) {
|
||||
$this->mustRotate = !file_exists($this->url);
|
||||
}
|
||||
|
||||
parent::write($record);
|
||||
}
|
||||
|
||||
/**
|
||||
* Rotates the files.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user