You are not logged in.
I write a small module to test log level.
#include<linux/kernel.h>
#include<linux/module.h>
#include<linux/init.h>
static int hello_init(void)
{
printk(KERN_ALERT "Hello, world \n ");
return 0;
}
static void hello_exit(void)
{
printk(KERN_ALERT "Goodbye, world \n");
}
module_init(hello_init);
module_exit(hello_exit);
And I change the current log level to 7, which is KERN_DEBUG, the lowest log level.
echo 7 > /proc/sys/kernel/printk
BUT when the module is loaded, instead of displaying the message on screen, it only append the message to /var/log/messages.
Offline
maybe its some kernel configuration...
Offline