• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
logging level order is not aligned order

#1
On the user guide, logging level is matching to the RFC 5424 levels.
These variety is matched, but these order is not matched.

on CI4:
Code:
        |       0 = Disables logging, Error logging TURNED OFF
        |       1 = Emergency Messages  - System is unusable
        |       2 = Alert Messages      - Action Must Be Taken Immediately
        |   3 = Critical Messages   - Application component unavailable, unexpected exception.
        |   4 = Runtime Errors      - Don't need immediate action, but should be monitored.
        |   5 = Debug               - Detailed debug information.
        |   6 = Warnings            - Exceptional occurrences that are not errors.
        |   7 = Notices             - Normal but significant events.
        |   8 = Info                - Interesting events, like user logging in, etc.
        |   9 = All Messages

on RFC 5424:

Code:
           Numerical         Severity
             Code

              0       Emergency: system is unusable
              1       Alert: action must be taken immediately
              2       Critical: critical conditions
              3       Error: error conditions
              4       Warning: warning conditions
              5       Notice: normal but significant condition
              6       Informational: informational messages
              7       Debug: debug-level messages

              Table 2. Syslog Message Severities

"debug" level is in the middle on CI4, lowest on RCF 5424.
Why don't you adjust the order?
Reply

#2
This was done as a nod to previous versions of CI where you could say, "log this error or other errors more critical" by specifying a threshold value.

We should probably remove the link to the RFC, honestly, since it's simply an implementation of PSR3, which doesn't specify any requirement for the numerical value used, nor does it specify that you should use the RFC's values. It simply references the levels. The only reason that was put in our docs was to provide a resource with more information about when the different levels should be considered useful.
Practical CodeIgniter 3  • CodeIgniter 4 Foundations - Coming Soon • Vulcan - CLI Tools for CI4
Reply

#3
on CI3:

Code:
| 0 = Disables logging, Error logging TURNED OFF
| 1 = Error Messages (including PHP errors)
| 2 = Debug Messages
| 3 = Informational Messages
| 4 = All Messages


Oh... I understand. Debug level is in the middle.

And PSR3 doesn't declare the order of log levels explicitly.

Perhaps I should agree to remove the link to the RFC, but, it is confusing whether the link is removed or not.
The 8 levels remind me of RFC 5424.
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2017 MyBB Group.