\Yansongda\SupportsLogger

Summary

Methods
Properties
Constants
__call()
setLogger()
getLogger()
createLogger()
setFormatter()
getFormatter()
createFormatter()
setHandler()
getHandler()
createHandler()
setConfig()
getConfig()
emergency()
alert()
critical()
error()
warning()
notice()
info()
debug()
log()
No public properties found
No constants found
No protected methods found
$logger
$formatter
$handler
$config
N/A
No private methods found
No private properties found
N/A

Properties

$logger

$logger : \Psr\Log\LoggerInterface

Logger instance.

Type

LoggerInterface

$formatter

$formatter : \Monolog\Formatter\FormatterInterface

formatter.

Type

FormatterInterface

$handler

$handler : \Monolog\Handler\AbstractHandler

handler.

Type

AbstractHandler

$config

$config : array

config.

Type

array

Methods

__call()

__call(string  $method, array  $args) : void

Forward call.

Parameters

string $method
array $args

Throws

\Exception

setLogger()

setLogger(\Psr\Log\LoggerInterface  $logger) : \Yansongda\Supports\Logger

Set logger.

Parameters

\Psr\Log\LoggerInterface $logger

Returns

\Yansongda\Supports\Logger —

getLogger()

getLogger() : \Psr\Log\LoggerInterface

Return the logger instance.

Throws

\Exception

Returns

\Psr\Log\LoggerInterface —

createLogger()

createLogger() : \Monolog\Logger

Make a default log instance.

Throws

\Exception

Returns

\Monolog\Logger —

setFormatter()

setFormatter(\Monolog\Formatter\FormatterInterface  $formatter) : $this

setFormatter.

Parameters

\Monolog\Formatter\FormatterInterface $formatter

Returns

$this —

getFormatter()

getFormatter() : \Monolog\Formatter\FormatterInterface

getFormatter.

Returns

\Monolog\Formatter\FormatterInterface —

createFormatter()

createFormatter() : \Monolog\Formatter\LineFormatter

createFormatter.

Returns

\Monolog\Formatter\LineFormatter —

setHandler()

setHandler(\Monolog\Handler\AbstractHandler  $handler) : $this

setHandler.

Parameters

\Monolog\Handler\AbstractHandler $handler

Returns

$this —

getHandler()

getHandler() : \Monolog\Handler\AbstractHandler

getHandler.

Throws

\Exception

Returns

\Monolog\Handler\AbstractHandler —

createHandler()

createHandler() : \Monolog\Handler\RotatingFileHandler|\Monolog\Handler\StreamHandler

createHandler.

Throws

\Exception

Returns

\Monolog\Handler\RotatingFileHandler|\Monolog\Handler\StreamHandler —

setConfig()

setConfig(array  $config) : $this

setConfig.

Parameters

array $config

Returns

$this —

getConfig()

getConfig() : array

getConfig.

Returns

array —

emergency()

emergency(mixed  $message, array  $context = array() : void

)

Parameters

mixed $message
array $context = array(

alert()

alert(mixed  $message, array  $context = array() : void

)

Parameters

mixed $message
array $context = array(

critical()

critical(mixed  $message, array  $context = array() : void

)

Parameters

mixed $message
array $context = array(

error()

error(mixed  $message, array  $context = array() : void

)

Parameters

mixed $message
array $context = array(

warning()

warning(mixed  $message, array  $context = array() : void

)

Parameters

mixed $message
array $context = array(

notice()

notice(mixed  $message, array  $context = array() : void

)

Parameters

mixed $message
array $context = array(

info()

info(mixed  $message, array  $context = array() : void

)

Parameters

mixed $message
array $context = array(

debug()

debug(mixed  $message, array  $context = array() : void

)

Parameters

mixed $message
array $context = array(

log()

log(mixed  $message, array  $context = array() : void

)

Parameters

mixed $message
array $context = array(