# HG changeset patch
# User emellor@xxxxxxxxxxxxxxxxxxxxxx
# Node ID 98c6c36ac4443ce7f95c87eb317bf13d868e14e0
# Parent e6591119fda0e488ece39e007f725ed011709996
Added a timestamp to the logging output by trace_io.
Signed-off-by: Ewan Mellor <ewan@xxxxxxxxxxxxx>
diff -r e6591119fda0 -r 98c6c36ac444 tools/xenstore/xenstored_core.c
--- a/tools/xenstore/xenstored_core.c Mon Oct 24 13:11:07 2005
+++ b/tools/xenstore/xenstored_core.c Mon Oct 24 13:12:42 2005
@@ -178,12 +178,18 @@
{
char string[64];
unsigned int i;
+ time_t now;
+ struct tm *tm;
if (tracefd < 0)
return;
+ now = time(NULL);
+ tm = localtime(&now);
+
write(tracefd, prefix, strlen(prefix));
- sprintf(string, " %p ", conn);
+ sprintf(string, " %p %0d:%0d:%0d ", conn, tm->tm_hour, tm->tm_min,
+ tm->tm_sec);
write(tracefd, string, strlen(string));
write(tracefd, sockmsg_string(data->hdr.msg.type),
strlen(sockmsg_string(data->hdr.msg.type)));
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|