add whether we're in which eventloop / a worker thread to the log output.
[citadel.git] / citadel / context.h
index 6d93249b93423e7fdbe6a7c2ddb672a314fb709b..cde77f496f5b278c5f658a4a5aa60bd82da273aa 100644 (file)
@@ -149,6 +149,8 @@ struct CitContext {
        long *cached_msglist;                   /* results of the previous CtdlForEachMessage() */
        int cached_num_msgs;
 
+       char vcard_updated_by_ldap;             /* !0 iff ldap changed the vcard, treat as aide update */
+
        AsyncIO *IO;                            /* if this session has AsyncIO going on... */
 };
 
@@ -210,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 */