mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 23:22:48 +08:00
日志级别warn更改为notic
This commit is contained in:
@@ -53,7 +53,7 @@ class Error
|
|||||||
case E_USER_WARNING:
|
case E_USER_WARNING:
|
||||||
case E_USER_NOTICE:
|
case E_USER_NOTICE:
|
||||||
default:
|
default:
|
||||||
Log::record($errorStr, 'warn');
|
Log::record($errorStr, 'notic');
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -265,7 +265,7 @@ class Loader
|
|||||||
if (class_exists($class)) {
|
if (class_exists($class)) {
|
||||||
$model = new $class($name);
|
$model = new $class($name);
|
||||||
} else {
|
} else {
|
||||||
Log::record('实例化不存在的类:' . $class, 'warn');
|
Log::record('实例化不存在的类:' . $class, 'notic');
|
||||||
$model = new Model($name);
|
$model = new Model($name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,13 +17,13 @@ class Log
|
|||||||
const ERROR = 'error';
|
const ERROR = 'error';
|
||||||
const INFO = 'info';
|
const INFO = 'info';
|
||||||
const SQL = 'sql';
|
const SQL = 'sql';
|
||||||
const WARN = 'warn';
|
const NOTIC = 'notic';
|
||||||
const ALERT = 'alert';
|
const ALERT = 'alert';
|
||||||
|
|
||||||
// 日志信息
|
// 日志信息
|
||||||
protected static $log = [];
|
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;
|
protected static $driver = null;
|
||||||
// 通知发送驱动
|
// 通知发送驱动
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ class Socket
|
|||||||
];
|
];
|
||||||
|
|
||||||
foreach ($logs as &$log) {
|
foreach ($logs as &$log) {
|
||||||
if (in_array($log['type'], ['sql', 'debug', 'info'])) {
|
if (in_array($log['type'], ['sql', 'notic', 'debug', 'info'])) {
|
||||||
$log['type'] = 'log';
|
$log['type'] = 'log';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user