mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-08 15:42:48 +08:00
notic修正
This commit is contained in:
@@ -93,7 +93,7 @@ class Error
|
|||||||
{
|
{
|
||||||
if ($errno & Config::get('exception_ignore_type')) {
|
if ($errno & Config::get('exception_ignore_type')) {
|
||||||
// 忽略的异常记录到日志
|
// 忽略的异常记录到日志
|
||||||
Log::record("[{$errno}]{$errstr}[{$errfile}:{$errline}]", 'notic');
|
Log::record("[{$errno}]{$errstr}[{$errfile}:{$errline}]", 'notice');
|
||||||
} else {
|
} else {
|
||||||
// 将错误信息托管至 think\exception\ErrorException
|
// 将错误信息托管至 think\exception\ErrorException
|
||||||
throw new ErrorException($errno, $errstr, $errfile, $errline, $errcontext);
|
throw new ErrorException($errno, $errstr, $errfile, $errline, $errcontext);
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ class Loader
|
|||||||
APP_DEBUG && self::$load[] = $filename;
|
APP_DEBUG && self::$load[] = $filename;
|
||||||
include $filename;
|
include $filename;
|
||||||
} else {
|
} else {
|
||||||
Log::record('autoloader error : ' . $filename, 'notic');
|
Log::record('autoloader error : ' . $filename, 'notice');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -294,7 +294,7 @@ class Loader
|
|||||||
if (class_exists($class)) {
|
if (class_exists($class)) {
|
||||||
$model = new $class($name);
|
$model = new $class($name);
|
||||||
} else {
|
} else {
|
||||||
Log::record('实例化不存在的类:' . $class, 'notic');
|
Log::record('实例化不存在的类:' . $class, 'notice');
|
||||||
$model = new Model($name);
|
$model = new Model($name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,17 +13,17 @@ namespace think;
|
|||||||
|
|
||||||
class Log
|
class Log
|
||||||
{
|
{
|
||||||
const LOG = 'log';
|
const LOG = 'log';
|
||||||
const ERROR = 'error';
|
const ERROR = 'error';
|
||||||
const INFO = 'info';
|
const INFO = 'info';
|
||||||
const SQL = 'sql';
|
const SQL = 'sql';
|
||||||
const NOTIC = 'notic';
|
const NOTICE = 'notice';
|
||||||
const ALERT = 'alert';
|
const ALERT = 'alert';
|
||||||
|
|
||||||
// 日志信息
|
// 日志信息
|
||||||
protected static $log = [];
|
protected static $log = [];
|
||||||
// 日志类型
|
// 日志类型
|
||||||
protected static $type = ['log', 'error', 'info', 'sql', 'notic', 'alert'];
|
protected static $type = ['log', 'error', 'info', 'sql', 'notice', 'alert'];
|
||||||
// 日志写入驱动
|
// 日志写入驱动
|
||||||
protected static $driver = null;
|
protected static $driver = null;
|
||||||
// 通知发送驱动
|
// 通知发送驱动
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ class Socket
|
|||||||
];
|
];
|
||||||
|
|
||||||
foreach ($logs as &$log) {
|
foreach ($logs as &$log) {
|
||||||
if (in_array($log['type'], ['sql', 'notic', 'debug', 'info'])) {
|
if (in_array($log['type'], ['sql', 'notice', 'debug', 'info'])) {
|
||||||
$log['type'] = 'log';
|
$log['type'] = 'log';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ namespace think\log\driver;
|
|||||||
*/
|
*/
|
||||||
class Trace
|
class Trace
|
||||||
{
|
{
|
||||||
protected $tabs = ['base' => '基本', 'file' => '文件', 'info' => '流程', 'notic|error' => '错误', 'sql' => 'SQL', 'debug|log' => '调试'];
|
protected $tabs = ['base' => '基本', 'file' => '文件', 'info' => '流程', 'notice|error' => '错误', 'sql' => 'SQL', 'debug|log' => '调试'];
|
||||||
protected $config = [
|
protected $config = [
|
||||||
'trace_file' => '',
|
'trace_file' => '',
|
||||||
];
|
];
|
||||||
|
|||||||
Reference in New Issue
Block a user