修正日志记录写法

This commit is contained in:
thinkphp
2015-12-20 18:23:21 +08:00
parent bbeb2e0d51
commit e654fcae5c
3 changed files with 3 additions and 3 deletions

View File

@@ -96,7 +96,7 @@ function G($start, $end = '', $dec = 6)
if ('' == $end) {
think\Debug::remark($start);
} else {
return 'm' == $dec ? think\Debug::getUseMem($start, $end) : think\Debug::getUseTime($start, $end, $dec);
return 'm' == $dec ? think\Debug::getRangeMem($start, $end) : think\Debug::getRangeTime($start, $end, $dec);
}
}

View File

@@ -441,7 +441,7 @@ class Lite
//$this->model = '_think_';
// 记录操作结束时间
Debug::remark('queryEndTime', 'time');
Log::record($this->queryStr . ' [ RunTime:' . Debug::getUseTime('queryStartTime', 'queryEndTime') . 's ]', 'SQL');
Log::record($this->queryStr . ' [ RunTime:' . Debug::getRangeTime('queryStartTime', 'queryEndTime') . 's ]', 'sql');
}
}
}

View File

@@ -98,7 +98,7 @@ class Hook
if (APP_DEBUG) {
Debug::remark('behavior_end', 'time');
Log::record('Run ' . $name . ' [ RunTime:' . Debug::getUseTime('behavior_start', 'behavior_end') . 's ]', 'INFO');
Log::record('Run ' . $name . ' [ RunTime:' . Debug::getRangeTime('behavior_start', 'behavior_end') . 's ]', 'log');
}
if (false === $result) {
// 如果返回false 则中断行为执行