We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e3bf671 commit 68c8e3eCopy full SHA for 68c8e3e
1 file changed
app/Exceptions/Handler.php
@@ -47,11 +47,7 @@ public function report(Exception $exception)
47
*/
48
public function render($request, Exception $exception)
49
{
50
- if (config('app.debug')) {
51
- \Log::info("请求导致异常的地址:" . $request->fullUrl() . ",请求IP:" . $request->getClientIp());
52
-
53
- parent::render($request, $exception);
54
- }
+ \Log::info("异常请求:" . $request->fullUrl() . ",IP:" . getClientIp());
55
56
// 捕获身份校验异常
57
if ($exception instanceof AuthenticationException) {
@@ -71,6 +67,7 @@ public function render($request, Exception $exception)
71
67
}
72
68
73
69
70
+ // 捕获反射异常
74
if ($exception instanceof ReflectionException) {
75
if ($request->ajax()) {
76
return response()->json(['status' => 'fail', 'data' => '', 'message' => 'System Error']);
0 commit comments