Welcome Guest, Not a member yet? Register   Sign In
CI4 ,Change Log Message FileHandler
#2

If you want to know the 404 URI, I recommend you see Web server log files.

If you remove 404 from $ignoreCodes in Config/Exceptions.php, the 404 Exception will be logged.
But if it is in production mode, the URI path is not included in the log. So useless.

PHP Code:
--- a/app/Config/Exceptions.php
+++ b/app/Config/Exceptions.php
@@ -31,+31,@@ class Exceptions extends BaseConfig
      
Any status codes here will NOT be logged if logging is turned on.
      By default, only 404 (Page Not Foundexceptions are ignored.
      */
-
    public array $ignoreCodes = [404];
+
    public array $ignoreCodes = [];

    /**
      * -------------------------------------------------------------------------- 

If v4.5.0 is released, the HTTP method and URI path will be logged:
Quote:CRITICAL - 2023-11-12 10:05:01 --> Page Not Found
[Method: GET, Route: xxx]
in SYSTEMPATH/CodeIgniter.php on line 931.
Reply


Messages In This Thread
CI4 ,Change Log Message FileHandler - by dhiya as - 11-11-2023, 04:14 PM
RE: CI4 ,Change Log Message FileHandler - by kenjis - 11-12-2023, 03:10 AM



Theme © iAndrew 2016 - Forum software by © MyBB