改进异常日志写入

This commit is contained in:
thinkphp
2016-02-02 11:02:33 +08:00
parent a049b3d663
commit 52a0dd1dfc

View File

@@ -74,7 +74,7 @@ class Error
}
// 记录异常日志
Log::write("[{$data['code']}]{$data['message']}[{$data['file']}:{$data['line']}]", 'error');
Log::record("[{$data['code']}]{$data['message']}[{$data['file']}:{$data['line']}]", 'error');
// 输出错误信息
self::output($exception, $data);
// 禁止往下传播已处理过的异常
@@ -110,7 +110,7 @@ class Error
{
// 写入日志
Log::save();
if ($error = error_get_last()) {
// 将错误信息托管至think\ErrorException
$exception = new ErrorException(