Print a bit more prettily.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3560 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/coregrind/m_debuglog.c b/coregrind/m_debuglog.c
index 6b79252..090f304 100644
--- a/coregrind/m_debuglog.c
+++ b/coregrind/m_debuglog.c
@@ -448,22 +448,27 @@
const HChar* format, ... )
{
UInt ret, pid;
+ Int indent;
va_list vargs;
printf_buf buf;
+
if (level > loglevel)
return;
+ indent = 1*level - 1;
+ if (indent < 1) indent = 1;
+
buf.n = 0;
buf.buf[0] = 0;
pid = local_sys_getpid();
- (void)myvprintf_str ( add_to_buf, &buf, 0, 1, "<", False );
- (void)myvprintf_int64 ( add_to_buf, &buf, 0, 10, 5, (ULong)pid );
- (void)myvprintf_str ( add_to_buf, &buf, 0, 1, ",", False );
+ (void)myvprintf_str ( add_to_buf, &buf, 0, 2, "--", False );
+ (void)myvprintf_int64 ( add_to_buf, &buf, 0, 10, 1, (ULong)pid );
+ (void)myvprintf_str ( add_to_buf, &buf, 0, 1, ":", False );
(void)myvprintf_int64 ( add_to_buf, &buf, 0, 10, 1, (ULong)level );
- (void)myvprintf_str ( add_to_buf, &buf, 0, 1, ",", False );
+ (void)myvprintf_str ( add_to_buf, &buf, 0, 1, ":", False );
(void)myvprintf_str ( add_to_buf, &buf, 0, 8, (HChar*)modulename, False );
- (void)myvprintf_str ( add_to_buf, &buf, 0, 2, "> ", False );
+ (void)myvprintf_str ( add_to_buf, &buf, 0, indent, "", False );
va_start(vargs,format);