LOGGING: make module infrastructure logging configurable
[citadel.git] / citadel / serv_extensions.h
index 59dcfec3a3b93d11d3e064b1351eb3b99a016d17..f4f720144d090da94eb6d5d816dddf35cbe31cb8 100644 (file)
  */
 
 typedef void (*CtdlDbgFunction) (const int);
  */
 
 typedef void (*CtdlDbgFunction) (const int);
+
+extern int DebugModules;
+#define MDBGLOG(LEVEL) if ((LEVEL != LOG_DEBUG) || (DebugModules != 0))
+
+#define MOD_syslog(LEVEL, FORMAT, ...)                         \
+       MDBGLOG(LEVEL) syslog(LEVEL,                            \
+                             "Modules: " FORMAT, __VA_ARGS__)
+
+#define MODM_syslog(LEVEL, FORMAT)                     \
+       MDBGLOG(LEVEL) syslog(LEVEL,                    \
+                             "Modules: " FORMAT);
+
+
 
 
 /*
 
 
 /*