
+ LEVEL_INFO = { + 'DEBUG' => 0, + 'INFO' => 1, + 'WARN' => 2, + 'ERROR' => 3, + 'FATAL' => 4, + 'UNKNOWN' => 5 + }.freeze
That matches https://github.com/ruby/logger/blob/master/lib/logger/severity.rb However does not match /c/linux/include/linux/kern_levels.h #define KERN_EMERG KERN_SOH "0" /* system is unusable */ #define KERN_ALERT KERN_SOH "1" /* action must be taken immediately */ #define KERN_CRIT KERN_SOH "2" /* critical conditions */ #define KERN_ERR KERN_SOH "3" /* error conditions */ #define KERN_WARNING KERN_SOH "4" /* warning conditions */ #define KERN_NOTICE KERN_SOH "5" /* normal but significant condition */ #define KERN_INFO KERN_SOH "6" /* informational */ #define KERN_DEBUG KERN_SOH "7" /* debug-level messages */ or https://www.ietf.org/rfc/rfc3164.txt 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 And here's python's https://docs.python.org/3/library/logging.html#logging-levels Java: https://www.tutorialspoint.com/log4j/log4j_logging_levels.htm ALL < TRACE < DEBUG < INFO < WARN < ERROR < FATAL < OFF 看起来语言级和系统级的log level编号大小正好相反。。 我们会同时收集两者吧? Thanks, Fengguang