]> git.itanic.dy.fi Git - rrdd/commitdiff
Prettify printing of pid numbers on debug messages
authorTimo Kokkonen <kaapeli@ee.oulu.fi>
Wed, 21 May 2008 15:15:05 +0000 (18:15 +0300)
committerTimo Kokkonen <kaapeli@ee.oulu.fi>
Wed, 21 May 2008 15:15:05 +0000 (18:15 +0300)
debug.h

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