Yuji Shimada
2008-Jul-08 08:53 UTC
[Xen-devel] [PATCH] Log qemu-dm''s message with date, time and pid without using an external tool.
The qemu-dm''s log message doesn''t have date, time, and pid. It is difficult to find out the message we want. When we use guest domain for several months, date and time are necessary to analyse the log file. pid is also useful for analysing the log file with other component''s log file. This patch solves the problem without changing the codes which write messages. Also without using an external tool. qemu-dm creates a pipe and starts new thread for logging. qemu-dm associates a stream with the pipe, and sets the stream to existing "logfile" variable. When qemu-dm writes a message to "logfile", the thread receives it through the pipe and outputs it with date, time and pid to the actual log file. When CONFIG_STUBDOM is defined, we can''t use pthread function so far. So I will remove #ifndef CONFIG_STUBDOM statement after pthread function is supported in stubdom. Thanks. Signed-off-by: Yuji Shimada <shimada-yxb@necst.nec.co.jp> -- Yuji Shimada _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel