重写Log类和驱动 SockectLog纳入Log驱动

This commit is contained in:
thinkphp
2015-12-20 18:08:36 +08:00
parent 4a35f56b1b
commit 0afe9e3aad
12 changed files with 379 additions and 502 deletions

View File

@@ -1156,16 +1156,11 @@ abstract class Driver
Debug::remark('queryStartTime', 'time');
} else {
$this->modelSql[$this->model] = $this->queryStr;
//$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');
}
}
if (SLOG_ON && $start) {
\think\Slog::sql($this->queryStr, $this->_linkID);
}
}
/**