CoolCMS API

LoggingConfig
in package

FinalYes

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

$all  : bool
$channels  : array<string|int, mixed>

Methods

__construct()  : mixed
isChannelEnabled()  : bool

Properties

$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
Return values
bool
On this page

Search results