CoolCMS API

Logger
in package
implements ILogger

FinalYes

Decorator around the Tracy `Logger` that filters the custom application channels ({@see LoggingConfig}).

Calling code is untouched. The decorator is wired through neon only: config/Shared/logging.neon overrides the DI service tracy.logger, and Tracy\Bridges\Nette\TracyExtension::afterCompile() notices the definition differs from its own [Debugger::class, 'getLogger'] and inserts Debugger::setLogger($this) into the generated container initialize(). It therefore works on the HTTP front end, cron and every CLI script that builds the container from the same config.

The Tracy severities (ILoggerlevels debug, info, warning, error, exception, critical; uncaught exceptions and PHP errors) and the security auth channel (RBAC audit trail, controlled separately by apiRbac.mode/internalMode, see config/Shared/api.neon) always pass, regardless of logging.all. That flag may only reduce diagnostic noise, never the visibility of real failures or the security audit.

Table of Contents

Interfaces

ILogger

Constants

ALWAYS_PASS  : array<string|int, mixed> = [self::DEBUG, self::INFO, self::WARNING, self::...

Properties

$config  : LoggingConfig
$inner  : ILogger

Methods

__construct()  : mixed
log()  : mixed

Constants

ALWAYS_PASS

private array<string|int, mixed> ALWAYS_PASS = [self::DEBUG, self::INFO, self::WARNING, self::ERROR, self::EXCEPTION, self::CRITICAL, 'auth']

Properties

$inner read-only

private ILogger $inner

Methods

log()

public log(mixed $message[, string $level = self::INFO ]) : mixed
Parameters
$message : mixed
$level : string = self::INFO
On this page

Search results