X-Git-Url: https://code.citadel.org/?p=citadel.git;a=blobdiff_plain;f=citadel%2Fcontext.h;fp=citadel%2Fcontext.h;h=9d158f469e5ae27355fcb99e540d6499dbf25db7;hp=08de75bb336a3b8d4b18161727c06cccbcdda53d;hb=92d82ca214f2f57d6311174a2231a8d031c2a77e;hpb=9f3bb5c0737c12bd1765425ad8676d5cde03f52f diff --git a/citadel/context.h b/citadel/context.h index 08de75bb3..9d158f469 100644 --- a/citadel/context.h +++ b/citadel/context.h @@ -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 */