From 879bd9ff9f91ba4b7d0091c78cf2092c7a31d695 Mon Sep 17 00:00:00 2001 From: Greg Sarjeant Date: Fri, 1 Aug 2025 14:21:28 -0400 Subject: [PATCH] Move route logging to router and log missing routes as warnings. --- public/index.php | 1 - src/Framework/Router/Router.php | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/public/index.php b/public/index.php index 54b63af..327c91a 100644 --- a/public/index.php +++ b/public/index.php @@ -98,7 +98,6 @@ header('Content-Type: text/html; charset=utf-8'); // Render the requested route or throw a 404 if (!Router::route($path, $method)){ - Log::error("No route found for path {$path}"); http_response_code(404); echo "404 - Page Not Found"; exit; diff --git a/src/Framework/Router/Router.php b/src/Framework/Router/Router.php index fefb28b..5d3e7b4 100644 --- a/src/Framework/Router/Router.php +++ b/src/Framework/Router/Router.php @@ -66,6 +66,7 @@ class Router { } } + Log::warning("No route found for path '{$requestPath}'"); return false; }