notic修正

This commit is contained in:
thinkphp
2016-02-02 21:41:38 +08:00
parent 8ed7c91b29
commit c0e8c95237
5 changed files with 12 additions and 12 deletions

View File

@@ -93,7 +93,7 @@ class Error
{
if ($errno & Config::get('exception_ignore_type')) {
// 忽略的异常记录到日志
Log::record("[{$errno}]{$errstr}[{$errfile}:{$errline}]", 'notic');
Log::record("[{$errno}]{$errstr}[{$errfile}:{$errline}]", 'notice');
} else {
// 将错误信息托管至 think\exception\ErrorException
throw new ErrorException($errno, $errstr, $errfile, $errline, $errcontext);

View File

@@ -71,7 +71,7 @@ class Loader
APP_DEBUG && self::$load[] = $filename;
include $filename;
} else {
Log::record('autoloader error : ' . $filename, 'notic');
Log::record('autoloader error : ' . $filename, 'notice');
}
}
}
@@ -294,7 +294,7 @@ class Loader
if (class_exists($class)) {
$model = new $class($name);
} else {
Log::record('实例化不存在的类:' . $class, 'notic');
Log::record('实例化不存在的类:' . $class, 'notice');
$model = new Model($name);
}
}

View File

@@ -13,17 +13,17 @@ namespace think;
class Log
{
const LOG = 'log';
const ERROR = 'error';
const INFO = 'info';
const SQL = 'sql';
const NOTIC = 'notic';
const ALERT = 'alert';
const LOG = 'log';
const ERROR = 'error';
const INFO = 'info';
const SQL = 'sql';
const NOTICE = 'notice';
const ALERT = 'alert';
// 日志信息
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;
// 通知发送驱动

View File

@@ -94,7 +94,7 @@ class Socket
];
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';
}
}

View File

@@ -15,7 +15,7 @@ namespace think\log\driver;
*/
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 = [
'trace_file' => '',
];