日志级别warn更改为notic

This commit is contained in:
thinkphp
2015-12-27 20:56:17 +08:00
parent b1de2d21bc
commit ae72fd7e10
4 changed files with 5 additions and 5 deletions

View File

@@ -53,7 +53,7 @@ class Error
case E_USER_WARNING:
case E_USER_NOTICE:
default:
Log::record($errorStr, 'warn');
Log::record($errorStr, 'notic');
break;
}
}

View File

@@ -265,7 +265,7 @@ class Loader
if (class_exists($class)) {
$model = new $class($name);
} else {
Log::record('实例化不存在的类:' . $class, 'warn');
Log::record('实例化不存在的类:' . $class, 'notic');
$model = new Model($name);
}
}

View File

@@ -17,13 +17,13 @@ class Log
const ERROR = 'error';
const INFO = 'info';
const SQL = 'sql';
const WARN = 'warn';
const NOTIC = 'notic';
const ALERT = 'alert';
// 日志信息
protected static $log = [];
// 日志类型
protected static $type = ['log', 'error', 'info', 'sql', 'warn', 'alert'];
protected static $type = ['log', 'error', 'info', 'sql', 'notic', 'alert'];
// 日志写入驱动
protected static $driver = null;
// 通知发送驱动

View File

@@ -88,7 +88,7 @@ class Socket
];
foreach ($logs as &$log) {
if (in_array($log['type'], ['sql', 'debug', 'info'])) {
if (in_array($log['type'], ['sql', 'notic', 'debug', 'info'])) {
$log['type'] = 'log';
}
}