From e2bf69ddb1542a1c5cd252fb52bc2417e3d00458 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Mon, 21 Dec 2015 08:37:09 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=84=E8=8C=83=E6=97=A5=E5=BF=97=E8=AE=B0?= =?UTF-8?q?=E5=BD=95=E7=BA=A7=E5=88=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/db/driver.php | 4 ++-- library/think/db/driver/mongo.php | 2 +- library/think/db/lite.php | 4 ++-- library/think/loader.php | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/library/think/db/driver.php b/library/think/db/driver.php index 70cebcd7..1be594a9 100644 --- a/library/think/db/driver.php +++ b/library/think/db/driver.php @@ -106,7 +106,7 @@ abstract class Driver $this->linkID[$linkNum] = new PDO($config['dsn'], $config['username'], $config['password'], $this->options); } 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()); @@ -373,7 +373,7 @@ abstract class Driver $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); diff --git a/library/think/db/driver/mongo.php b/library/think/db/driver/mongo.php index 384ec1e8..53f83c14 100644 --- a/library/think/db/driver/mongo.php +++ b/library/think/db/driver/mongo.php @@ -195,7 +195,7 @@ class Mongo extends Driver public function error() { $this->error = $this->_mongo->lastError(); - Log::record($this->error, 'ERR'); + Log::record($this->error, 'error'); return $this->error; } diff --git a/library/think/db/lite.php b/library/think/db/lite.php index 2aa066d9..ee5ca9d2 100644 --- a/library/think/db/lite.php +++ b/library/think/db/lite.php @@ -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); diff --git a/library/think/loader.php b/library/think/loader.php index 6434af59..265cfb2d 100644 --- a/library/think/loader.php +++ b/library/think/loader.php @@ -262,7 +262,7 @@ class Loader if (class_exists($class)) { $model = new $class($name); } else { - Log::record('实例化不存在的类:' . $class, 'NOTIC'); + Log::record('实例化不存在的类:' . $class, 'warn'); $model = new Model($name); } }