On Fri, 2003-04-11 at 12:16, Alan Cox wrote: > Providing the viewer is translating the originals always exist. Indeed > you can do > > LANG=es view-logs > LANG=ru view-logs > ... > > You can have sysadmins with no common language("not a recommended > configuration" ;)) > > You are right about needing to log parameters, but given a log line > of the form > > %s: went up in flames\n\0eth0\0\0 > > that can be handled by the log viewer Other contributors have also endorsed the idea of creating a message log where the format and args are kept separate. Here's code to do it. Enclosed is a patch that adds support for logging kernel events to a structured event log (see evlog.sourceforge.net). When EVLOG_FWPRINTK is enabled, printk messages are automatically forwarded to the event log in this form. (They are also logged to klogd/syslogd, as usual.) The log viewer (evlview) can reconstruct the complete message from the components. If you provide translations (AKA formatting templates) for particular messages, and set your LANG environment variable appropriately, evlview will display those messages in the selected language. (Messages without translations are displayed in English.) A few more notes about this event-logging support: - printk calls don't change; one line is added to printk(), about 20 to printk.c. - Like syslog, it also handles messages from user space. There are also a variety of other ways to use this support to log information from the kernel. - User-mode event logging requires no kernel support. - There's a bunch of stuff that sysadmins and tech support people have found useful, such as APIs for examining the log and receiving notification of events. See evlog.sourceforge.net for more info. Jim Keniston IBM Linux Technology Center