I am using 'pr_debug()' to print debug statements. But I don't see anything in my serial console. But when I use pr_info(), I see the debug statements. Do I need to do anything to see pr_debug()? Thank you.
On Wed, Feb 26, 2014 at 11:35:23AM -0800, m silverstri wrote:
I am using 'pr_debug()' to print debug statements. But I don't see anything in my serial console. But when I use pr_info(), I see the debug statements. Do I need to do anything to see pr_debug()?
add this to the top of the file (before the includes) #define DEBUG on my system the output goes to /var/log/debug
On Wed, 26 Feb 2014 11:35:23 -0800, m silverstri said:
I am using 'pr_debug()' to print debug statements. But I don't see anything in my serial console. But when I use pr_info(), I see the debug statements. Do I need to do anything to see pr_debug()?
You probably need a #define DEBUG. Also, check your console logging level, make sure it's set to output debug-level to the console. /proc/sys/kernel/printk and 'dmesg --console-level' are your friends.
Yes, if you add line below, console_loglevel = 8; // 8 is debug level The debug messages will also be printed to your console (serial port). maybe you could revert it back after use. Chan ________________________________ From : "Valdis.Kletnieks@vt.edu" <Valdis.Kletnieks@vt.edu> Sent : 2014-02-27 07:31:25 ( +09:00 ) To : m silverstri <michael.j.silverstri@gmail.com> Cc : kernelnewbies <kernelnewbies@kernelnewbies.org> Subject : Re: How to use pr_debug On Wed, 26 Feb 2014 11:35:23 -0800, m silverstri said:
I am using 'pr_debug()' to print debug statements. But I don't see anything in my serial console. But when I use pr_info(), I see the debug statements. Do I need to do anything to see pr_debug()?
You probably need a #define DEBUG. Also, check your console logging level, make sure it's set to output debug-level to the console. /proc/sys/kernel/printk and 'dmesg --console-level' are your friends.
Yes, if you add a line below, console_loglevel = 8; // 8 is debug level The debug messages will also be printed to your console (serial port). (Maybe this also goes to /var/log/debug ?) you could revert it back after use. Chan ________________________________ From : "Valdis.Kletnieks@vt.edu" <Valdis.Kletnieks@vt.edu> Sent : 2014-02-27 07:31:25 ( +09:00 ) To : m silverstri <michael.j.silverstri@gmail.com> Cc : kernelnewbies <kernelnewbies@kernelnewbies.org> Subject : Re: How to use pr_debug On Wed, 26 Feb 2014 11:35:23 -0800, m silverstri said:
I am using 'pr_debug()' to print debug statements. But I don't see anything in my serial console. But when I use pr_info(), I see the debug statements. Do I need to do anything to see pr_debug()?
You probably need a #define DEBUG. Also, check your console logging level, make sure it's set to output debug-level to the console. /proc/sys/kernel/printk and 'dmesg --console-level' are your friends.
participants (5)
-
John de la Garza -
Kim Chan -
m silverstri -
Valdis.Kletnieks@vt.edu -
김찬