class LoggerChannelFactory implements LoggerChannelFactoryInterface, ContainerAwareInterface (View source)

Defines a factory for logging channels.

Traits

ContainerAwareTrait

Properties

protected LoggerChannelInterface[] $channels

Array of all instantiated logger channels keyed by channel name.

protected array $loggers

An array of arrays of \Psr\Log\LoggerInterface keyed by priority.

Methods

get($channel)

Retrieves the registered logger for the requested channel.

addLogger(LoggerInterface $logger, int $priority = 0)

Adds a logger to all the channels.

Details

LoggerChannelInterface get($channel)

Retrieves the registered logger for the requested channel.

Parameters

$channel

Return Value

LoggerChannelInterface

The registered logger for this channel.

addLogger(LoggerInterface $logger, int $priority = 0)

Adds a logger to all the channels.

Parameters

LoggerInterface $logger

The PSR-3 logger to add.

int $priority

The priority of the logger being added.