\hymieLogger

符合 Psr log 规范的 log 类,根据配置会使用 monolog 或者 Psr\Log\NullLogger。

Summary

Methods
Properties
Constants
getInstance()
__construct()
log()
setLogger()
getLogger()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$instance
$logger
N/A

Properties

$instance

$instance : object

静态实例

Type

object

$logger

$logger : \Psr\Log\LoggerInterface

具体的 loger 实例

Type

\Psr\Log\LoggerInterface

Methods

getInstance()

getInstance() : void

单例方法

__construct()

__construct() 

构造函数

读取 'logger' bean 如存在则使用否则使用 \psr\Log\NullLogger

log()

log(string  $level, string  $message, array  $context = array()) : void

log 方法,记录日志

Parameters

string $level

日志等级

string $message

日志消息

array $context

上下文数组

setLogger()

setLogger(\Psr\Log\LoggerInterface  $logger) : void

set log 实现类

Parameters

\Psr\Log\LoggerInterface $logger

getLogger()

getLogger() : \Psr\Log\LoggerInterface

getter

Returns

\Psr\Log\LoggerInterface