admin 7 vuotta sitten
vanhempi
sitoutus
68c8e3e769
1 muutettua tiedostoa jossa 2 lisäystä ja 5 poistoa
  1. 2 5
      app/Exceptions/Handler.php

+ 2 - 5
app/Exceptions/Handler.php

@@ -47,11 +47,7 @@ class Handler extends ExceptionHandler
      */
     public function render($request, Exception $exception)
     {
-        if (config('app.debug')) {
-            \Log::info("请求导致异常的地址:" . $request->fullUrl() . ",请求IP:" . $request->getClientIp());
-
-            parent::render($request, $exception);
-        }
+        \Log::info("异常请求:" . $request->fullUrl() . ",IP:" . getClientIp());
 
         // 捕获身份校验异常
         if ($exception instanceof AuthenticationException) {
@@ -71,6 +67,7 @@ class Handler extends ExceptionHandler
             }
         }
 
+        // 捕获反射异常
         if ($exception instanceof ReflectionException) {
             if ($request->ajax()) {
                 return response()->json(['status' => 'fail', 'data' => '', 'message' => 'System Error']);