[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b3ece790808121735t21b4a629iaf6a968b30332d74@mail.gmail.com>
Date: Tue, 12 Aug 2008 17:35:24 -0700
From: "Tim Hockin" <thockin@...kin.org>
To: "Martin Schwidefsky" <schwidefsky@...ibm.com>
Cc: linux-kernel@...r.kernel.org, linux-s390@...r.kernel.org,
lf_kernel_messages@...ts.linux-foundation.org,
"Andrew Morton" <akpm@...ux-foundation.org>,
"Michael Holzheu" <holzheu@...ibm.com>,
"Gerrit Huizenga" <gh@...ibm.com>,
"Greg Kroah-Hartman" <gregkh@...e.de>,
"Randy Dunlap" <randy.dunlap@...cle.com>,
"Jan Kara" <jack@...e.cz>, "Pavel Machek" <pavel@....cz>,
"Sam Ravnborg" <sam@...nborg.org>, "Joe Perches" <joe@...ches.com>,
"Jochen Voß" <jochen.voss@...glemail.com>,
"Kunai Takashi" <kunai@...ux-foundation.jp>,
"Tim Bird" <tim.bird@...sony.com>
Subject: Re: [patch 1/3] kmsg: Kernel message catalog macros.
On Wed, Jul 30, 2008 at 9:56 AM, Martin Schwidefsky
<schwidefsky@...ibm.com> wrote:
> From: Michael Holzheu <holzheu@...ibm.com>
> From: Martin Schwidefsky <schwidefsky@...ibm.com>
>
> Introduce a new family of printk macros which prefixes each kmsg message
> with a component name and allows to tag the printk with a message id.
We've been talking about doing something like this, just this week. AKPM
pointed me at this thread. Good timing. :)
> +#define kmsg_dev_alert(id, dev, format, arg...) \
> + printk(__KMSG_CHECK(ALERT, id) KMSG_COMPONENT \
> + ": %s: " format, (dev)->bus_id , ## arg)
Rather than the gcc-specific '## arg', shouldn't we use the standard C99
form: '##__VA_ARGS__' ?
As a format, I would argue to leave out the spaces after colons, making
the inevitable string splitting even easier.
I don't care for the magic file-global KMSG_COMPONENT. It just feels
wrong. In most cases, I want the prefix to be hierarchical. For example,
rather than "tg3" I want "net.tg3" or "netdev:tg3" or something.
Further, We want to make a clearer denotation between "just another
printk()" and these things, which are really "important events". Maybe a
global prefix that makes it easy to seperate them out? Or a parallel
"event" interface that logs to printk() and a netlink socket?
Tim
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists