LOG_LEVEL_DEBUG
LOG_LEVEL_DEBUG
PhalApi_Logger 日记抽象类
接口实现示例:
class PhalApi_Logger_Mock extends PhalApi_Logger {
public function log($type, $msg, $data) {
//nothing to do here ...
}
}
//保存全部类型的日记
$logger = new PhalApi_Logger_Mock(
PhalApi_Logger::LOG_LEVEL_DEBUG | PhalApi_Logger::LOG_LEVEL_INFO | PhalApi_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');