Move route logging to router and log missing routes as warnings.
This commit is contained in:
		
							parent
							
								
									a7e79796fa
								
							
						
					
					
						commit
						879bd9ff9f
					
				| @ -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; | ||||
|  | ||||
| @ -66,6 +66,7 @@ class Router { | ||||
|             } | ||||
|         } | ||||
| 
 | ||||
|         Log::warning("No route found for path '{$requestPath}'"); | ||||
|         return false; | ||||
|     } | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user