NullHandler
extends Handler
in package
Blackhole
Any record it can handle will be thrown away. This can be used to put on top of an existing stack to override it temporarily.
Tags
Table of Contents
Properties
Methods
- __construct() : mixed
- __destruct() : mixed
- __sleep() : mixed
- close() : void
- Closes the handler.
- handle() : bool
- Handles a record.
- handleBatch() : void
- Handles a set of records at once.
- isHandling() : bool
- Checks whether the given record will be handled by this handler.
Properties
$level
private
Level
$level
Methods
__construct()
public
__construct([string|int|Level $level = Level::Debug ]) : mixed
Parameters
- $level : string|int|Level = Level::Debug
-
The minimum logging level at which this handler will be triggered
Tags
__destruct()
public
__destruct() : mixed
__sleep()
public
__sleep() : mixed
close()
Closes the handler.
public
close() : void
Tags
handle()
Handles a record.
public
handle(LogRecord $record) : bool
Parameters
- $record : LogRecord
-
The record to handle
Tags
Return values
bool —true means that this handler handled the record, and that bubbling is not permitted. false means the record was either not processed or that this handler allows bubbling.
handleBatch()
Handles a set of records at once.
public
handleBatch(array<string|int, mixed> $records) : void
Parameters
- $records : array<string|int, mixed>
-
The records to handle
Tags
isHandling()
Checks whether the given record will be handled by this handler.
public
isHandling(LogRecord $record) : bool
Parameters
- $record : LogRecord
-
Partial log record having only a level initialized