Re: [PATCH-RFC] POSIX Event Logging, kernel 2.5.6 & 2.4.18y

Alan Cox
2002-03-15T01:34:08Z

> I am absolutely open to suggestions for making printk messages better
> and more useful--we just haven't figured-out how yet.

What you don't want to do is break printk. In AberMUD I used macros for
something similar

#define Module static char *Mod_Name=
#define Version static char *Ver_Name=
#define Author static char *Aut_Name=

#define Error(x) ErrFunc((x),Mod_Name,Ver_Name,__LINE__,__FILE__)

And drivers started

Module "System";
Version "1.28";
Author "----*(A)";

However that doesn't work for varargs. Nevertheless something of a similar
approach might let you avoid breaking printk in most old code. If you can
avoid a grand replacement of printk you win lots of friends. If you can
do it in a way that people can do automated parsing of kernel messages
for translation tables in klogd/initlog/dmesg you also win lots of friends.