mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-06 07:02:47 +08:00
取消 APP_DEBUG 常量 改为 App::$debug 属性获取 设置调试模式 改为 app_debug 配置参数 在应用配置文件中设置
This commit is contained in:
@@ -13,6 +13,7 @@ namespace think\db;
|
||||
|
||||
use PDO;
|
||||
use PDOStatement;
|
||||
use think\App;
|
||||
use think\Collection;
|
||||
use think\Db;
|
||||
use think\db\Query;
|
||||
@@ -260,7 +261,7 @@ abstract class Connection
|
||||
}
|
||||
$this->links[$linkNum] = new PDO($config['dsn'], $config['username'], $config['password'], $params);
|
||||
// 记录数据库连接信息
|
||||
APP_DEBUG && Log::record('[ DB ] CONNECT: ' . $config['dsn'], 'info');
|
||||
App::$debug && Log::record('[ DB ] CONNECT: ' . $config['dsn'], 'info');
|
||||
} catch (\PDOException $e) {
|
||||
if ($autoConnection) {
|
||||
Log::record($e->getMessage(), 'error');
|
||||
|
||||
Reference in New Issue
Block a user