]> git.itanic.dy.fi Git - rrdd/blob - debug.h
Make all debug output go through wrappers
[rrdd] / debug.h
1 #ifndef __DEBUG_H
2 #define __DEBUG_H
3
4 #include <unistd.h>
5
6 extern const char red_color[];
7 extern const char green_color[];
8 extern const char normal_color[];
9
10 #define pr_err(fmt, arg...) \
11         fprintf(stderr, "%s[%d] %s:%d Error %s" fmt, red_color, getpid(), \
12                 __FILE__, __LINE__, normal_color, ##arg)
13
14 #define pr_info(fmt, arg...) \
15         printf("%s[%d] %s:%d %s" fmt, green_color, getpid(), \
16                __FILE__, __LINE__, normal_color, ##arg)
17
18 #endif