1
0
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:
Christophe Coevoet
2011-04-06 13:22:06 +02:00
parent 87332a3e4e
commit 3cb3dbdc8f
16 changed files with 125 additions and 124 deletions

View File

@@ -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.
*/