54 if ($formatter === null) {
55 $formatter = new \Plop\Formatter();
57 if ($filters === null) {
58 $filters = new \Plop\FiltersCollection();
60 $this->setFormatter($formatter);
61 $this->filters = $filters;
67 return $this->formatter;
73 $this->formatter = $formatter;
80 return $this->filters;
86 $this->filters = $filters;
101 return $this->formatter->format($record);
118 $rv = $this->format($record);
120 $this->emit($record);
137 return fopen(
'php://stderr',
'at');
145 $stderr = $this->getStderr();
146 fprintf($stderr,
"%s\n", $exception);
handle(\Plop\RecordInterface $record)
An abstract class that can be used as a base to create new log records handlers.
Interface for a log record.
$filters
An object handling a collection of filters.
Interface for a class capable of handling log records.
format(\Plop\RecordInterface $record)
handleError(\Plop\RecordInterface $record,\Exception $exception)
setFormatter(\Plop\FormatterInterface $formatter)
Abstract class for a collection of filters.
setFilters(\Plop\FiltersCollectionAbstract $filters)
__construct(\Plop\FormatterInterface $formatter=null,\Plop\FiltersCollectionAbstract $filters=null)
This exception is thrown by Plop whenever a problem is detected.
$formatter
Formatter object to use for this handler.