PHP 클래스 Autarky\Logging\ChannelManager

상속: extends Psr\Log\AbstractLogger, implements Psr\Log\LoggerInterface
파일 보기 프로젝트 열기: autarky/framework 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$channels Psr\Log\LoggerInterface[] The defined channels.
$defaultChannel string The name of the default channel to use.
$deferredChannels callable[] The deferred channel callbacks.

공개 메소드들

메소드 설명
__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.

메소드 상세

__construct() 공개 메소드

Constructor.
public __construct ( string $defaultChannel = 'default' )
$defaultChannel string

getChannel() 공개 메소드

Get a specific channel.
public getChannel ( string $channel = null ) : Psr\Log\LoggerInterface
$channel string Optional - if none, use default channel
리턴 Psr\Log\LoggerInterface

getDefaultChannelName() 공개 메소드

Get the name of the default channel.
public getDefaultChannelName ( ) : string
리턴 string

log() 공개 메소드

public log ( $level, $message, array $context = [] )
$context array

setChannel() 공개 메소드

Set a channel instance.
public setChannel ( string $channel, Psr\Log\LoggerInterface $logger )
$channel string
$logger Psr\Log\LoggerInterface

setDefaultChannel() 공개 메소드

Change the default channel.
public setDefaultChannel ( string $channel )
$channel string

setDeferredChannel() 공개 메소드

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 setDeferredChannel ( string $channel, callable $callback )
$channel string
$callback callable Callback that takes no arguments

프로퍼티 상세

$channels 보호되어 있는 프로퍼티

The defined channels.
protected LoggerInterface[],Psr\Log $channels
리턴 Psr\Log\LoggerInterface[]

$defaultChannel 보호되어 있는 프로퍼티

The name of the default channel to use.
protected string $defaultChannel
리턴 string

$deferredChannels 보호되어 있는 프로퍼티

The deferred channel callbacks.
protected callable[] $deferredChannels
리턴 callable[]