1、内核更新

2、模板管理优化
This commit is contained in:
2016-12-04 16:15:43 +08:00
parent e2910d287a
commit e28383f667
10 changed files with 371 additions and 78 deletions

View File

@@ -32,13 +32,14 @@ class Log
const SQL = 'sql';
const NOTICE = 'notice';
const ALERT = 'alert';
const DEBUG = 'debug';
// 日志信息
protected static $log = [];
// 配置参数
protected static $config = [];
// 日志类型
protected static $type = ['log', 'error', 'info', 'sql', 'notice', 'alert'];
protected static $type = ['log', 'error', 'info', 'sql', 'notice', 'alert', 'debug'];
// 日志写入驱动
protected static $driver;
@@ -136,6 +137,9 @@ class Log
if (empty(self::$config['level'])) {
// 获取全部日志
$log = self::$log;
if (!App::$debug && isset($log['debug'])) {
unset($log['debug']);
}
} else {
// 记录允许级别
$log = [];
@@ -180,7 +184,7 @@ class Log
self::init(Config::get('log'));
}
// 写入日志
return self::$driver->save($log);
return self::$driver->save($log, false);
}
/**