add whether we're in which eventloop / a worker thread to the log output.
[citadel.git] / citadel / context.h
index 4b450a416720bbc9cd0c9eb415a12415b50f5516..cde77f496f5b278c5f658a4a5aa60bd82da273aa 100644 (file)
@@ -212,13 +212,13 @@ static INLINE void become_session(CitContext *which_con) {
 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 CON_syslog(LEVEL, FORMAT, ...)                                 \
+       CONDBGLOG(LEVEL) syslog(LEVEL,                                  \
+                               "%s Context: " FORMAT, IOSTR, __VA_ARGS__)
 
-#define CONM_syslog(LEVEL, FORMAT)                     \
-       CONDBGLOG(LEVEL) syslog(LEVEL,                  \
-                               "Context: " FORMAT);
+#define CONM_syslog(LEVEL, FORMAT)                             \
+       CONDBGLOG(LEVEL) syslog(LEVEL,                          \
+                               "%s Context: " FORMAT, IOSTR);
 
 
 #endif /* CONTEXT_H */