One (ugly) way to handle this would be to have a new "level" field in
the printk index entry, with semantics that if it's some sentinel value,
look at the format itself for the format, otherwise if it's some other
value, the level field itself is the level.
This will work, but it's pretty ugly. Any better suggestions? :-)
Well, that was more or less exactly what I suggested when I wrote
One could also record the function a format is being used with - without
that, the display probably can't show a reasonable <level> for those
dev_* function.
But, I think the real question is, why are we/you interested in the
level at all? Isn't the format string itself enough for the purpose of
tracking which printks have come and gone? IOW, what about, on the
display side, simply skipping over some KERN_* prefix if present?