diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php index 1ec2920..b26b795 100644 --- a/app/Exceptions/Handler.php +++ b/app/Exceptions/Handler.php @@ -38,11 +38,14 @@ protected function sendSlackException(Throwable $e): void if (!$url) return; + $ip = request()?->ip() ?? 'N/A'; // 요청이 없는 경우 대비 + Http::post($url, [ 'text' => "*[Laravel] 예외 발생!*\n" . "• 메시지: `{$e->getMessage()}`\n" . "• 위치: `{$e->getFile()}:{$e->getLine()}`\n" . - "• 시간: " . now()->toDateTimeString() + "• 시간: " . now()->toDateTimeString() . "\n" . + "• IP: `{$ip}`" ]); } catch (Throwable $ex) { logger()->error('슬랙 전송 실패', ['message' => $ex->getMessage()]);