Property | Type | Description | |
---|---|---|---|
$channels | Psr\Log\LoggerInterface[] | The defined channels. | |
$defaultChannel | string | The name of the default channel to use. | |
$deferredChannels | callable[] | The deferred channel callbacks. |
Method | Description | |
---|---|---|
__construct ( string $defaultChannel = 'default' ) | Constructor. | |
getChannel ( string $channel = null ) : Psr\Log\LoggerInterface | Get a specific channel. | |
getDefaultChannelName ( ) : string | Get the name of the default channel. | |
log ( $level, $message, array $context = [] ) | ||
setChannel ( string $channel, Psr\Log\LoggerInterface $logger ) | Set a channel instance. | |
setDefaultChannel ( string $channel ) | Change the default channel. | |
setDeferredChannel ( string $channel, callable $callback ) | Define a deferred channel. The callback will be invoked and the return value passed to setChannel. The return value must implement Psr\Log\LoggerInterface. |
public __construct ( string $defaultChannel = 'default' ) | ||
$defaultChannel | string |
public getChannel ( string $channel = null ) : Psr\Log\LoggerInterface | ||
$channel | string | Optional - if none, use default channel |
return | Psr\Log\LoggerInterface |
public getDefaultChannelName ( ) : string | ||
return | string |
public setChannel ( string $channel, Psr\Log\LoggerInterface $logger ) | ||
$channel | string | |
$logger | Psr\Log\LoggerInterface |
public setDefaultChannel ( string $channel ) | ||
$channel | string |
public setDeferredChannel ( string $channel, callable $callback ) | ||
$channel | string | |
$callback | callable | Callback that takes no arguments |
protected LoggerInterface[],Psr\Log $channels | ||
return | Psr\Log\LoggerInterface[] |
protected string $defaultChannel | ||
return | string |