From 7d0ac3159e5d9f0b85dc457b685c923f7adf40e4 Mon Sep 17 00:00:00 2001 From: hskwon Date: Wed, 24 Sep 2025 14:14:38 +0900 Subject: [PATCH] =?UTF-8?q?fix=20:=20=EC=8A=AC=EB=A0=89=EB=A9=94=EC=8B=9C?= =?UTF-8?q?=EC=A7=80=EC=97=90=20IP=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Exceptions/Handler.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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()]);