printk는 다음과 같이 로그레벨을 설정할 수 있다.

printk(KERN_DEBUG "*** This is a debug message only. ***\n");

include/linux/kernel.h 파일 안에는 다음과 같이 전체 로그레벨이 정의되어 있다.

#define KERN_EMERG      "<0>"   /* system is unusable                   */
#define KERN_ALERT      "<1>"   /* action must be taken immediately     */
#define KERN_CRIT       "<2>"   /* critical conditions                  */
#define KERN_ERR        "<3>"   /* error conditions                     */
#define KERN_WARNING    "<4>"   /* warning conditions                   */
#define KERN_NOTICE     "<5>"   /* normal but significant condition     */
#define KERN_INFO       "<6>"   /* informational                        */
#define KERN_DEBUG      "<7>"   /* debug-level messages                 */

Posted by 알 수 없는 사용자
,