mini\Logger\ScopedLogger final class

Documentation

Logger decorator that prefixes messages with a scope identifier

Useful for adding component/module context to log messages without coupling code to a specific logger implementation.

Usage: $log = new ScopedLogger('http', \mini\log()); $log->info("Request received"); // Output: [http] Request received

Inheritance

Implements: Psr\Log\LoggerInterface

Uses Traits: Psr\Log\LoggerTrait

Properties (2)

private string $scope
private Psr\Log\LoggerInterface $inner

Methods (10)

Documentation missing

Documentation missing

System is unusable.

Action must be taken immediately.

Critical conditions.

Runtime errors that do not require immediate action but should typically

Exceptional occurrences that are not errors.

Normal but significant events.

Interesting events.

Detailed debug information.

Source

src/Logger/ScopedLogger.php:19-35