However, directly hooking printk has one practical issue: the hook handler has to parse the input to printk, which is a non-trivial job (e.g., to interpret the semantic of format strings like "%x").
we look into the source code of printk and find a function cont_add that is invoked by printk and handles already formatted output.