Chain
Less than 1 minute
Chain
Properties
config
private array $configbackends
private array $backendsMethods
__construct
Chain constructor.
public __construct(array $config): voidInitializes logger backends based on the provided configuration.
Parameters
| Parameter | Type | Description |
|---|---|---|
$config | array | Configuration array. Must contain 'backends' as an array of backend names. |
write
Write a log entry to all logger backends.
public write(string $level, string $message, array $context): voidParameters
| Parameter | Type | Description |
|---|---|---|
$level | string | Log level (e.g., 'info', 'error'). |
$message | string | log message |
$context | array | contextual data for the log entry |
close
Close all logger backends.
public close(): voidCalls the close() method on each backend instance.
Generated by Hazaar API Doc Generator on Sun, 01 Mar 2026 09:22:26 +0000