1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-08-06 13:16:39 +02:00

Fixes based on comments.

- Change function to private.
- Use private variable correctly.
This commit is contained in:
Birkir A. Barkarson
2013-10-11 14:58:39 +09:00
parent 7b6e1f3c31
commit 0f4401891e

View File

@@ -61,7 +61,7 @@ class StreamHandler extends AbstractProcessingHandler
if (!$this->url) {
throw new \LogicException('Missing stream url, the stream can not be opened. This may be caused by a premature call to close().');
}
$errorMessage = null;
$this->errorMessage = null;
set_error_handler(array($this, 'customErrorHandler'));
$this->stream = fopen($this->url, 'a');
restore_error_handler();
@@ -73,7 +73,7 @@ class StreamHandler extends AbstractProcessingHandler
fwrite($this->stream, (string) $record['formatted']);
}
protected function customErrorHandler($code, $msg) {
private function customErrorHandler($code, $msg) {
$this->errorMessage = preg_replace('{^fopen\(.*?\): }', '', $msg);
}
}