[wplug] using printk
Ingimarson, Darin
dingimarson at Quantapoint.com
Wed Nov 13 13:02:37 EST 2002
Henry,
> This is what I am trying to do:
>
> #define MODULE
> #include <linux/module.h>
>
> int init_module(void)
> {
> printk("Hello kernel n");
> return 0;
> }
The observed behavior is not correct, I think.
The above does not include a priority setting for the printk statement, so
it
should default to DEFAULT_MESSAGE_LOGLEVEL (which is 4, from the 2.4.19
kernel tree).
Given that your syslog.conf is set to report level of INFO (6) and higher,
you are
correct, you should see some output...
> and my syslog.conf file is:
>
> *.info /var/log/messages
>
> so everything above info should be logged, but I'm guessing that I need
> everything above debug.
Try the following:
- temporarily assign KERN_CRIT priority to your printk() call
- add a line to syslog.conf that will specifically log messages from the
kernel, thusly:
*.info /var/log/messages
kern.* /var/log/messages
- or add a line to syslog.conf that will specifically log messages to the
console:
*.info /var/log/messages
kern.* /dev/console
More information about the wplug
mailing list