LoggingConfig
in package
Diagnostic logging configuration (`config/Shared/logging.neon`).
The Debugger::log($msg, 'channel') channels can be switched on and off as a tree, so
production does not log all diagnostics at once (performance) but can enable just the part of
the system being debugged.
A channel is a dotted path (save.error, eshop.import). isChannelEnabled() walks the
$channels tree segment by segment; the first scalar (bool) it meets decides for the whole
remaining path, including unlisted descendants, so save: true enables save.error and
save.rollback even when the config does not list them. A segment that is not found is
fail-closed false: a new channel without a config line stays silent until someone enables it.
$all = true overrides the tree completely.
Table of Contents
Properties
Methods
- __construct() : mixed
- isChannelEnabled() : bool
Properties
$all read-only
public
bool
$all
$channels read-only
private
array<string|int, mixed>
$channels
Methods
__construct()
public
__construct(bool $all, array<string, mixed> $channels) : mixed
Parameters
- $all : bool
- $channels : array<string, mixed>
-
tree map of channel to bool or nested array
isChannelEnabled()
public
isChannelEnabled(string $dottedChannel) : bool
Parameters
- $dottedChannel : string