Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Linux - Kernel This forum is for all discussion relating to the Linux kernel.


  Search this Thread
Old 03-24-2007, 12:15 PM   #1
Sergei Lavrov
LQ Newbie
Registered: Mar 2007
Posts: 1

Rep: Reputation: 0
printk(KERN_DEBUG ...) vs printk(...)

What is difference between printk(KERN_DEBUG ...) and printk( ...) ?
After I replace the latter with the former, the kernel is not dumping debug messages anymore.
Old 03-25-2007, 04:00 PM   #2
Registered: Dec 2005
Posts: 514

Rep: Reputation: 66
Well, I know nothing about Kernel editing so I'll take a stab at it.

The KERN_DEBUG is telling printk to print only anything related to KERN_DEBUG whereas printk with no arguments will print everything.
Old 03-25-2007, 04:41 PM   #3
Senior Member
Registered: Nov 2006
Distribution: Debian Squeeze SMP AMD64
Posts: 3,275

Rep: Reputation: 126Reputation: 126
From "Linux Device Drivers" by Corbet et al, page 77:
A printk statement with no specified priority defaults to DEFAULT_MESSAGE_LOGLEVEL, specified in kernel/printk.c as an integer. In the 2.6.10 kernel, DEFAULT_MESSAGE_LOGLEVEL is KERN_WARNING, but that has been known to change in the past.
There's more. Buy the book.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Printk is not printing allomeen Programming 2 04-07-2006 10:44 AM
Using printk arunachalam Linux - Software 1 10-10-2005 03:07 PM
Regarding printk eshwar_ind Programming 0 11-23-2004 06:17 AM
printk: message ernobe Debian 4 11-20-2004 11:50 AM
printk or /proc unosoft Linux - Software 0 10-22-2003 04:05 PM

All times are GMT -5. The time now is 02:48 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration