SMTPSrv: don't use memset() to forget - we have structured data in there now.
[citadel.git] / citadel / serv_extensions.h
index 0ef8e14083337390e5c3b697eebe785c6c3565c0..f4f720144d090da94eb6d5d816dddf35cbe31cb8 100644 (file)
 /*
  */
 
-typedef void (*CtdlDbgFunction) (void);
+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);
+
+
 
 
 /*
@@ -85,7 +97,7 @@ void CtdlDestroySearchHooks(void);
 void CtdlDestroyFixedOutputHooks(void);
 int PerformFixedOutputHooks(char *, char *, int);
 
-void CtdlRegisterDebugFlagHook(const char *Name, long len, CtdlDbgFunction F);
+void CtdlRegisterDebugFlagHook(const char *Name, long len, CtdlDbgFunction F, const int *);
 void CtdlSetDebugLogFacilities(const char **Str, long n);
 void CtdlDestroyDebugTable(void);