49 if (self::$stderr === null) {
50 self::$stderr = fopen(
'php://stderr',
'w');
55 parent::__construct();
67 if (is_resource($this->stream)) {
68 fflush($this->stream);
75 $msg = $this->
format($record);
76 fprintf($this->stream,
"%s\n", $msg);
An abstract class that can be used as a base to create new log records handlers.
static $stderr
A stream referencing STDERR.
Interface for a log record.
format(\Plop\RecordInterface $record)
$stream
The stream where log messages will be write to.
__construct($stream=null)
An handler that writes log messages to a PHP stream.
emit(\Plop\RecordInterface $record)