File
Less than 1 minute
File
class File implements \Hazaar\Logger\Interface\BackendImplements: Hazaar\Logger\Interface\Backend
Properties
config
private File\Options $configType: Hazaar\Logger\Backend\File\Options
hLog
private mixed $hLogType: mixed
hErr
private mixed $hErrType: mixed
Methods
__construct
File backend constructor.
public __construct(array|File\Options $config): voidInitializes log and error file handles based on configuration.
Parameters
| Parameter | Type | Description |
|---|---|---|
$config | array | Hazaar\Logger\Backend\File\Options |
write
Write a log entry to the log file.
public write(string $level, string $message, array $context): voidReturns: void
Parameters
| Parameter | Type | Description |
|---|---|---|
$level | string | Log level (e.g., 'notice', 'error'). |
$message | string | log message to write |
$context | array | additional context for the log entry (currently unused) |
close
Close open log and error file handles.
public close(): voidReturns: void
Generated by Hazaar API Doc Generator on Fri, 04 Sep 2026 23:32:17 +0000