Move route logging to router and log missing routes as warnings.

This commit is contained in:
Greg Sarjeant 2025-08-01 14:21:28 -04:00
parent a7e79796fa
commit 879bd9ff9f
2 changed files with 1 additions and 1 deletions

View File

@ -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;

View File

@ -66,6 +66,7 @@ class Router {
}
}
Log::warning("No route found for path '{$requestPath}'");
return false;
}