Class Logger
A logger service, which is inspired by Monolog
- Wei\Base
-
Wei\Logger
Namespace: Wei
Author: Twin Huang twinhuang@qq.com
Link: https://github.com/Seldaek/monolog
Located at Logger.php
Author: Twin Huang twinhuang@qq.com
Link: https://github.com/Seldaek/monolog
Located at Logger.php
public
boolean
|
|
protected
boolean
|
|
protected
string
|
|
public
boolean
|
|
public
boolean
|
|
public
boolean
|
|
public
boolean
|
|
public
boolean
|
|
public
boolean
|
|
public
boolean
|
|
public
boolean
|
|
public
boolean
|
|
public
string
|
|
public
|
|
public
|
|
public
|
|
public
|
|
protected
|
|
public
|
__call(),
__construct(),
__get(),
getOption(),
setOption()
|
protected
string
|
$namespace
The name of channel |
#
''
|
protected
string
|
$level
The default level for log record which level is not specified |
#
'debug'
|
protected
string
|
$handledLevel
The lowest level to be handled |
#
'debug'
|
protected
array
|
$levels
The log levels and priorities |
#
array(
'debug' => 100,
'info' => 200,
'notice' => 250,
'warning' => 300,
'error' => 400,
'critical' => 500,
'alert' => 550,
'emergency' => 600
)
|
protected
string
|
$format
The format for log message |
#
"[%datetime%] %level%: %message%\n"
|
protected
string
|
$dateFormat
The date format for log message |
#
'H:i:s'
|
protected
null|string
|
$file
The log file name, if specify this parameter, the "dir" and "fileFormat" parameters would be ignored |
#
null
|
protected
string
|
$dir
The directory to store log files |
#
'log'
|
protected
string
|
$fileFormat
The log file name, formatted by date |
#
'Ymd.\l\o\g'
|
protected
integer
|
$fileSize
The max file size for log file, default to 128mb, set 0 to ignore this property |
#
134217728
|
protected
boolean
|
$fileDetected
Whether log file's exact path has been detected, when set dir, fileFormat or fileSize options, log file should be detected again |
#
false
|
protected
array
|
$context
A key-value array that append to the log message |
#
array()
|
$providers,
$wei
|