Monolog\Handler\TestHandler
Used for testing purposes.
It records all records and gives you access to them for verification.
- Author: Jordi Boggiano <j.boggiano@seld.be>
Synopsis
class TestHandler
extends AbstractProcessingHandler
{
- // members
- protected array $records;
- protected array $recordsByLevel;
- // Inherited members from AbstractHandler
- protected $level;
- protected $bubble;
- protected FormatterInterface $formatter;
- protected array $processors;
- // methods
- public void getRecords()
- public void hasEmergency()
- public void hasAlert()
- public void hasCritical()
- public void hasError()
- public void hasWarning()
- public void hasNotice()
- public void hasInfo()
- public void hasDebug()
- public void hasEmergencyRecords()
- public void hasAlertRecords()
- public void hasCriticalRecords()
- public void hasErrorRecords()
- public void hasWarningRecords()
- public void hasNoticeRecords()
- public void hasInfoRecords()
- public void hasDebugRecords()
- protected void hasRecord()
- protected void write()
- // Inherited methods from AbstractProcessingHandler
- public void handle()
- protected abstract void write()
- protected array processRecord()
- // Inherited methods from AbstractHandler
- public void __construct()
- public void isHandling()
- public void handleBatch()
- public void close()
- public void pushProcessor()
- public void popProcessor()
- public void setFormatter()
- public void getFormatter()
- public void setLevel()
- public integer getLevel()
- public void setBubble()
- public Boolean getBubble()
- public void __destruct()
- protected FormatterInterface getDefaultFormatter()
Hierarchy
Extends
Extended by
Members
protected
- $bubble
- $formatter — Monolog\Formatter\FormatterInterface
- $level
- $processors
- $records
- $recordsByLevel
Methods
protected
- hasRecord()
- write() — {@inheritdoc}
public
- getRecords()
- hasAlert()
- hasAlertRecords()
- hasCritical()
- hasCriticalRecords()
- hasDebug()
- hasDebugRecords()
- hasEmergency()
- hasEmergencyRecords()
- hasError()
- hasErrorRecords()
- hasInfo()
- hasInfoRecords()
- hasNotice()
- hasNoticeRecords()
- hasWarning()
- hasWarningRecords()
Inherited from Monolog\Handler\AbstractProcessingHandler
protected
- processRecord() — Processes a record.
- write() — Writes the record down to the log of the implementing handler
public
- handle() — {@inheritdoc}
Inherited from Monolog\Handler\AbstractHandler
protected
- getDefaultFormatter() — Gets the default formatter.
public
- close() — Closes the handler.
- getBubble() — Gets the bubbling behavior.
- getFormatter() — {@inheritdoc}
- getLevel() — Gets minimum logging level at which this handler will be triggered.
- handleBatch() — {@inheritdoc}
- isHandling() — {@inheritdoc}
- popProcessor() — {@inheritdoc}
- pushProcessor() — {@inheritdoc}
- setBubble() — Sets the bubbling behavior.
- setFormatter() — {@inheritdoc}
- setLevel() — Sets minimum logging level at which this handler will be triggered.