mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-01 12:42:48 +08:00
修正日志记录写法
This commit is contained in:
2
base.php
2
base.php
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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 则中断行为执行
|
||||
|
||||
Reference in New Issue
Block a user