]> arthur.barton.de Git - netdata.git/blobdiff - src/log.h
code optimizations; added temperature charts.d plugin
[netdata.git] / src / log.h
index ac81c0b829036e5f374ea0415d749c01a7dc2e71..5e6fe1b06ef00827f16f785b8f10e670699cce77 100755 (executable)
--- a/src/log.h
+++ b/src/log.h
 #define D_CHILDS            0x00001000
 #define D_EXIT              0x00002000
 #define D_CHECKS            0x00004000
+#define D_NFACCT_LOOP          0x00008000
+#define D_PROCFILE                     0x00010000
+#define D_RRD_CALLS                    0x00020000
+#define D_DICTIONARY           0x00040000
+#define D_MEMORY                       0x00080000
 
 #define DEBUG (D_WEB_CLIENT_ACCESS|D_LISTENER|D_RRD_STATS)
 //#define DEBUG 0xffffffff
@@ -26,6 +31,8 @@
 
 extern unsigned long long debug_flags;
 
+extern const char *program_name;
+
 extern int silent;
 
 extern int access_fd;
@@ -35,7 +42,7 @@ extern int access_log_syslog;
 extern int error_log_syslog;
 extern int output_log_syslog;
 
-#define debug(type, args...) do { if(!silent && debug_flags & type) debug_int(__FILE__, __FUNCTION__, __LINE__, ##args); } while(0)
+#define debug(type, args...) do { if(unlikely(!silent && (debug_flags & type))) debug_int(__FILE__, __FUNCTION__, __LINE__, ##args); } while(0)
 #define info(args...)  info_int(__FILE__, __FUNCTION__, __LINE__, ##args)
 #define error(args...)  error_int(__FILE__, __FUNCTION__, __LINE__, ##args)
 #define fatal(args...)  fatal_int(__FILE__, __FUNCTION__, __LINE__, ##args)