mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-06 23:02:48 +08:00
取消 APP_DEBUG 常量 改为 App::$debug 属性获取 设置调试模式 改为 app_debug 配置参数 在应用配置文件中设置
This commit is contained in:
@@ -11,6 +11,8 @@
|
||||
|
||||
namespace think;
|
||||
|
||||
use think\App;
|
||||
|
||||
class Log
|
||||
{
|
||||
const LOG = 'log';
|
||||
@@ -45,7 +47,7 @@ class Log
|
||||
unset($config['type']);
|
||||
self::$driver = new $class($config);
|
||||
// 记录初始化信息
|
||||
APP_DEBUG && Log::record('[ LOG ] INIT ' . $type . ': ' . var_export($config, true), 'info');
|
||||
App::$debug && Log::record('[ LOG ] INIT ' . $type . ': ' . var_export($config, true), 'info');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -59,7 +61,7 @@ class Log
|
||||
unset($config['type']);
|
||||
self::$alarm = new $class($config['alarm']);
|
||||
// 记录初始化信息
|
||||
APP_DEBUG && Log::record('[ CACHE ] ALARM ' . $type . ': ' . var_export($config, true), 'info');
|
||||
App::$debug && Log::record('[ CACHE ] ALARM ' . $type . ': ' . var_export($config, true), 'info');
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user