LOG_LEVEL_DEBUG
LOG_LEVEL_DEBUG
Logger 日记抽象类
接口实现示例:
class LoggerMock extends Logger {
public function log($type, $msg, $data) {
//nothing to do here ...
}
}
//保存全部类型的日记
$logger = new LoggerMock(
Logger::LOG_LEVEL_DEBUG | Logger::LOG_LEVEL_INFO | Logger::LOG_LEVEL_ERROR);
//开发调试使用,且带更多信息
$logger->debug('this is bebug test', array('name' => 'mock', 'ver' => '1.0.0'));
//业务场景使用
$logger->info('this is info test', 'and more detail here ...');
//一些不该发生的事情
$logger->error('this is error test');