]> code.citadel.org Git - citadel.git/blobdiff - citadel/context.h
Eventhandling: fix shutdownhandlers
[citadel.git] / citadel / context.h
index 08de75bb336a3b8d4b18161727c06cccbcdda53d..903195c37ccbee9f3a7f400ff885b3dcf9b5062b 100644 (file)
@@ -195,4 +195,19 @@ static INLINE void become_session(CitContext *which_con) {
 }
 
 
+
+/* typedef void (*CtdlDbgFunction) (const int); */
+
+extern int DebugSession;
+#define CONDBGLOG(LEVEL) if ((LEVEL != LOG_DEBUG) || (DebugSession != 0))
+
+#define CON_syslog(LEVEL, FORMAT, ...)                         \
+       CONDBGLOG(LEVEL) syslog(LEVEL,                          \
+                               "Context: " FORMAT, __VA_ARGS__)
+
+#define CONM_syslog(LEVEL, FORMAT)                     \
+       CONDBGLOG(LEVEL) syslog(LEVEL,                  \
+                               "Context: " FORMAT);
+
+
 #endif /* CONTEXT_H */