\PhalApi_Logger_Explorer

PhalApi_Logger_Explorer 直接输出日记到控制台的日记类

  • 测试环境下使用

Summary

Methods
Properties
Constants
__construct()
log()
info()
debug()
error()
No public properties found
LOG_LEVEL_DEBUG
LOG_LEVEL_INFO
LOG_LEVEL_ERROR
isAllowToLog()
$logLevel
N/A
No private methods found
No private properties found
N/A

Constants

LOG_LEVEL_DEBUG

LOG_LEVEL_DEBUG

LOG_LEVEL_INFO

LOG_LEVEL_INFO

LOG_LEVEL_ERROR

LOG_LEVEL_ERROR

Properties

$logLevel

$logLevel : integer

Type

integer — log level, can be multi

Methods

__construct()

__construct(  $level) 

Parameters

$level

log()

log(string  $type, string  $msg, \string/array  $data) : NULL

Record log

wtite the log into different storage medium according your need

Parameters

string $type

the type of log, such as info, debug, error, etc.

string $msg

key description of log

\string/array $data

infomation of the context

Returns

NULL

info()

info(string  $msg, \string/array  $data = NULL) : NULL

The logs in production level

Parameters

string $msg

key description of log

\string/array $data

infomation of the context

Returns

NULL

debug()

debug(string  $msg, \string/array  $data = NULL) : NULL

The logs in debugger level

Parameters

string $msg

key description of log

\string/array $data

infomation of the context

Returns

NULL

error()

error(string  $msg, \string/array  $data = NULL) : NULL

The logs in system error level

Parameters

string $msg

key description of log

\string/array $data

infomation of the context

Returns

NULL

isAllowToLog()

isAllowToLog(integer  $logLevel) : boolean

Is allowed to write into or not, arithmetic or operation

Parameters

integer $logLevel

Returns

boolean