]> git.itanic.dy.fi Git - rrdd/commitdiff
Fix debug message indenting bug
authorTimo Kokkonen <kaapeli@ee.oulu.fi>
Wed, 21 May 2008 16:51:14 +0000 (19:51 +0300)
committerTimo Kokkonen <kaapeli@ee.oulu.fi>
Wed, 21 May 2008 16:51:14 +0000 (19:51 +0300)
debug.h

diff --git a/debug.h b/debug.h
index 06060fe68d14ba878aac8dd3f92fb8f2a882bff8..36b3dc234ce07dcc9abdc0e6aa2916818ddf3bc7 100644 (file)
--- a/debug.h
+++ b/debug.h
@@ -10,20 +10,22 @@ extern const char normal_color[];
 
 #define pr_info(fmt, arg...)                                           \
        do {                                                            \
-               char indent[16] = { ' ' };                              \
+               char indent[16] = { "               " };                \
                indent[get_parent_count()] = 0;                         \
-               fprintf(stderr, "%s%s[%5d] %s:%d %s"                    \
-                       fmt, indent, green_color, getpid(),             \
+               fprintf(stderr, "%s%s[%d.%5d] %s:%d %s"                 \
+                       fmt, indent, green_color, get_process_count(),  \
+                       getpid(),                                       \
                        __FILE__, __LINE__, normal_color, ##arg);       \
        } while (0)
 
 
 #define pr_err(fmt, arg...)                                            \
        do {                                                            \
-               char indent[16] = { ' ' };                              \
+               char indent[16] = { "               " };                \
                indent[get_parent_count()] = 0;                         \
-               fprintf(stderr, "%s%s[%5d] %s:%d Error %s"              \
-                       fmt, indent, red_color, getpid(),               \
+               fprintf(stderr, "%s%s[%d.%5d] %s:%d Error %s"           \
+                       fmt, indent, red_color, get_process_count(),    \
+                       getpid(),                                       \
                        __FILE__, __LINE__, normal_color, ##arg);       \
        } while (0)