final class LogManager (View source)

Provides framework-owned app, error and request log channels.

Methods

__construct(LoggingConfig $config, LogFilePathResolver $pathResolver, DirectoryManagerInterface $directoryManager)

Initializes cached built-in loggers using canonical files and shared retention.

LoggerInterface
error()

Returns the always-available runtime exception channel.

LoggerInterface
LoggerInterface
app()

Returns the always-available application channel bound as the PSR logger.

LoggerInterface
LoggerInterface

Returns the optional HTTP request channel or a null logger when disabled.

LoggerInterface
bool
enabled(string $channel, bool $default = false)

Reports whether a built-in channel writes records under the active policy.

bool

Details

__construct

__construct(LoggingConfig $config, LogFilePathResolver $pathResolver, DirectoryManagerInterface $directoryManager)

Initializes cached built-in loggers using canonical files and shared retention.

Parameters

LoggingConfig $config
LogFilePathResolver $pathResolver
DirectoryManagerInterface $directoryManager

error

LoggerInterface error()

Returns the always-available runtime exception channel.

Return Value

LoggerInterface

app

LoggerInterface app()

Returns the always-available application channel bound as the PSR logger.

Return Value

LoggerInterface

request

LoggerInterface request()

Returns the optional HTTP request channel or a null logger when disabled.

Return Value

LoggerInterface

enabled

bool enabled(string $channel, bool $default = false)

Reports whether a built-in channel writes records under the active policy.

Parameters

string $channel
bool $default

Return Value

bool