mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-01 12:42:48 +08:00
日志级别warn更改为notic
This commit is contained in:
@@ -53,7 +53,7 @@ class Error
|
||||
case E_USER_WARNING:
|
||||
case E_USER_NOTICE:
|
||||
default:
|
||||
Log::record($errorStr, 'warn');
|
||||
Log::record($errorStr, 'notic');
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
// 通知发送驱动
|
||||
|
||||
@@ -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';
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user