From mboxrd@z Thu Jan 1 00:00:00 1970 From: greg@kroah.com (Greg KH) Date: Sat, 11 Jul 2015 07:36:19 -0700 Subject: Displaying debug level printk messages in systemd In-Reply-To: <55A114D6.8030707@gmail.com> References: <55A114D6.8030707@gmail.com> Message-ID: <20150711143619.GA3754@kroah.com> To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org On Sat, Jul 11, 2015 at 11:06:30PM +1000, Orion Agali wrote: > I'm using Arch and I cannot figure out how to get printk debug messages to > display in journalctl. > > I tried the following: > ? * Set LogLevel=debug in /etc/systemd/systemd.conf > ? * Add kernel parameter 'debug' on boot > ? * Setting loglevel=8 in /proc/sys/kernel/printk > ? * dmsg -n 8 > > Consider the following module: > > ---------- > #include > #include > #include > static int __init task1_init(void) > { > ??? pr_notice("I am at level notice"); > ??? pr_debug("I am at level debug."); > ??? return 0; > } > static void __exit task1_exit(void){} > module_init(task1_init); > module_exit(task1_exit); > ------------ > > The notice level is printed but the debug level is not. > The debug message is not in dmesg or /dev/kmsg either > > The answer is probably straight forward, but I've hit a wall so I'm hoping > somebody here will be able to point me in the right direction Take a look at Documentation/dynamic-debug-howto.txt for how to get pr_debug() working properly for your module.