]> arthur.barton.de Git - netdata.git/blobdiff - src/log.h
code optimizations; added temperature charts.d plugin
[netdata.git] / src / log.h
index 7955e729d7fb783be56d3c95dcab89e26fb9c0f6..5e6fe1b06ef00827f16f785b8f10e670699cce77 100755 (executable)
--- a/src/log.h
+++ b/src/log.h
@@ -23,6 +23,7 @@
 #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
@@ -30,6 +31,8 @@
 
 extern unsigned long long debug_flags;
 
+extern const char *program_name;
+
 extern int silent;
 
 extern int access_fd;
@@ -39,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)