From c0e8c95237a2082037d099e9a046ae4c50e5d113 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Tue, 2 Feb 2016 21:41:38 +0800 Subject: [PATCH] =?UTF-8?q?notic=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/Error.php | 2 +- library/think/Loader.php | 4 ++-- library/think/Log.php | 14 +++++++------- library/think/log/driver/Socket.php | 2 +- library/think/log/driver/Trace.php | 2 +- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/library/think/Error.php b/library/think/Error.php index 218d6710..d62f68cb 100644 --- a/library/think/Error.php +++ b/library/think/Error.php @@ -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); diff --git a/library/think/Loader.php b/library/think/Loader.php index 07731367..9e0183ee 100644 --- a/library/think/Loader.php +++ b/library/think/Loader.php @@ -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); } } diff --git a/library/think/Log.php b/library/think/Log.php index aaecfbf2..4178a321 100644 --- a/library/think/Log.php +++ b/library/think/Log.php @@ -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; // 通知发送驱动 diff --git a/library/think/log/driver/Socket.php b/library/think/log/driver/Socket.php index 6ee6ddac..25d27f5e 100644 --- a/library/think/log/driver/Socket.php +++ b/library/think/log/driver/Socket.php @@ -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'; } } diff --git a/library/think/log/driver/Trace.php b/library/think/log/driver/Trace.php index d1b02c9c..7cc3c182 100644 --- a/library/think/log/driver/Trace.php +++ b/library/think/log/driver/Trace.php @@ -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' => '', ];