One of the very first things to learn in a new software development environment is the ability to print messages like the popular “Hello World!” on a console. In the previous lesson, we have briefly seen printk()
to print simple messages on the console. In this lesson we will learn more about logging using both the simple method of printk()
and a sophisticated method using the advanced logging module.
In the exercises section of this lesson, we will first practice using the user-friendly printk()
function to print string literals and formatted strings to a console. In Exercise 2, we will cover enabling/configuring the features-rich logger module to print string literals, formatted strings, and hex dump variables. Lastly, in Exercise 3, we will examine the logger module features in more depth.
printk()
printk()