取消 APP_DEBUG 常量 改为 App::$debug 属性获取 设置调试模式 改为 app_debug 配置参数 在应用配置文件中设置

This commit is contained in:
thinkphp
2016-06-15 16:43:31 +08:00
parent 343252324a
commit 4c848c4a74
25 changed files with 62 additions and 40 deletions

View File

@@ -11,6 +11,7 @@
namespace think;
use think\App;
use think\Collection;
use think\db\Query;
@@ -68,7 +69,7 @@ class Db
}
$class = (!empty($options['namespace']) ? $options['namespace'] : '\\think\\db\\connector\\') . ucwords($options['type']);
// 记录初始化信息
APP_DEBUG && Log::record('[ DB ] INIT ' . $options['type'] . ':' . var_export($options, true), 'info');
App::$debug && Log::record('[ DB ] INIT ' . $options['type'] . ':' . var_export($options, true), 'info');
if (true === $name) {
return new $class($options);
} else {