csync_log.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032 #ifndef _CSYNC_LOG_H
00033 #define _CSYNC_LOG_H
00034
00035
00036 #ifdef __GNUC__
00037 #define PRINTF_ATTRIBUTE(a,b) __attribute__ ((__format__ (__printf__, a, b)))
00038 #else
00039 #define PRINTF_ATTRIBUTE(a,b)
00040 #endif
00041
00042 enum csync_log_priority_e {
00043 CSYNC_LOG_PRIORITY_NOLOG = 0,
00044 CSYNC_LOG_PRIORITY_FATAL,
00045 CSYNC_LOG_PRIORITY_ALERT,
00046 CSYNC_LOG_PRIORITY_CRIT,
00047 CSYNC_LOG_PRIORITY_ERROR,
00048 CSYNC_LOG_PRIORITY_WARN,
00049 CSYNC_LOG_PRIORITY_NOTICE,
00050 CSYNC_LOG_PRIORITY_INFO,
00051 CSYNC_LOG_PRIORITY_DEBUG,
00052 CSYNC_LOG_PRIORITY_TRACE,
00053 CSYNC_LOG_PRIORITY_NOTSET,
00054 CSYNC_LOG_PRIORITY_UNKNOWN,
00055 };
00056
00057 #define CSYNC_LOG(priority, ...) \
00058 csync_log(ctx, priority, __FUNCTION__, __VA_ARGS__)
00059
00060 void csync_log(CSYNC *ctx,
00061 int verbosity,
00062 const char *function,
00063 const char *format, ...) PRINTF_ATTRIBUTE(4, 5);
00064
00065
00066
00067
00068 #endif
00069
00070