Re: [PATCH] printk: support structured and multi-facility logmessages

From: Joe Perches
Date: Thu Apr 05 2012 - 07:45:00 EST


On Thu, 2012-04-05 at 10:35 +0200, Kay Sievers wrote:
> The use of structured data is mainly focused on subsystem specific
> users. Like the block layer or the network stack could invent a bunch
> of well-defined set of properties, and wrap the emission of these up
> in some common subsystem logging functions for their drivers to use.
> They would reflect common log events, meaningful in the context of a
> specific subsystem.

I think this is generally less useful that you do.

> Think of it more like the model how we handle properties in uevents,
> it's a similar approach.
>
> This is not so much intended to convert the (almost random) language
> in slightly better (random) key/value pairs.

I think you should highlight this in the changelog.
People _will_ use it that way anyway.

> Userpace, which is the
> only reason to add that stuff in the first place, will need to know
> how to make sense out of the passed values, so in the future, we will
> need some kind of coordination per subsystem here.

I think you should separate your patch a bit.

Don't call it an extension to printk(), it's
hardly that, printk() is a function call that emits
stuff. The printk subsystem does a lot more.

perhaps:

changes for printk_emit()
changes for dev_printk
changes for devkmsg_


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/