mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-05 22:52:49 +08:00
规范日志记录级别
This commit is contained in:
@@ -103,7 +103,7 @@ class Lite
|
||||
$this->linkID[$linkNum] = new PDO($config['dsn'], $config['username'], $config['password'], $config['params']);
|
||||
} catch (\PDOException $e) {
|
||||
if ($autoConnection) {
|
||||
Log::record($e->getMessage(), 'ERR');
|
||||
Log::record($e->getMessage(), 'error');
|
||||
return $this->connect($autoConnection, $linkNum);
|
||||
} elseif ($config['debug']) {
|
||||
throw new Exception($e->getMessage());
|
||||
@@ -363,7 +363,7 @@ class Lite
|
||||
$this->error .= "\n [ SQL语句 ] : " . $this->queryStr;
|
||||
}
|
||||
// 记录错误日志
|
||||
Log::record($this->error, 'ERR');
|
||||
Log::record($this->error, 'error');
|
||||
if ($this->config['debug']) {
|
||||
// 开启数据库调试模式
|
||||
throw new Exception($this->error);
|
||||
|
||||
Reference in New Issue
Block a user