Number | Macro | Log Level | Description | Equivalent |
---|---|---|---|---|
0 | pr_emerg | Emergency | System is unusable. | KERN_EMERG |
1 | pr_alert | Alert | Action must be taken immediately. | KERN_ALERT |
2 | pr_crit | Critical | Critical conditions. | KERN_CRIT |
3 | pr_err | Error | Error conditions. | KERN_ERR |
4 | pr_warn | Warning | Warning conditions. | KERN_WARNING |
5 | pr_notice | Notice | Normal but significant condition. | KERN_NOTICE |
6 | pr_info | Informational | Informational messages. | KERN_INFO |
7 | pr_debug | Debug | Debugging messages. | KERN_DEBUG |
- The number corresponds to the log level used by the Linux kernel, with lower numbers indicating higher severity.
- For example, if the log level is set to
4
(Warning), only messages frompr_emerg
topr_warn
will appear in the system logs. Default log level is generally set to 6.