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
00033
00034
00035
00036
00042 #ifndef __DRIZZLE_LOCAL_H
00043 #define __DRIZZLE_LOCAL_H
00044
00045 #ifdef __cplusplus
00046 extern "C" {
00047 #endif
00048
00063 DRIZZLE_LOCAL
00064 void drizzle_set_error(drizzle_st *drizzle, const char *function,
00065 const char *format, ...);
00066
00076 DRIZZLE_LOCAL
00077 void drizzle_log(drizzle_st *drizzle, drizzle_verbose_t verbose,
00078 const char *format, va_list args);
00079
00083 static inline void drizzle_log_fatal(drizzle_st *drizzle, const char *format,
00084 ...)
00085 {
00086 va_list args;
00087
00088 if (drizzle->verbose >= DRIZZLE_VERBOSE_FATAL)
00089 {
00090 va_start(args, format);
00091 drizzle_log(drizzle, DRIZZLE_VERBOSE_FATAL, format, args);
00092 va_end(args);
00093 }
00094 }
00095
00099 static inline void drizzle_log_error(drizzle_st *drizzle, const char *format,
00100 ...)
00101 {
00102 va_list args;
00103
00104 if (drizzle->verbose >= DRIZZLE_VERBOSE_ERROR)
00105 {
00106 va_start(args, format);
00107 drizzle_log(drizzle, DRIZZLE_VERBOSE_ERROR, format, args);
00108 va_end(args);
00109 }
00110 }
00111
00115 static inline void drizzle_log_info(drizzle_st *drizzle, const char *format,
00116 ...)
00117 {
00118 va_list args;
00119
00120 if (drizzle->verbose >= DRIZZLE_VERBOSE_INFO)
00121 {
00122 va_start(args, format);
00123 drizzle_log(drizzle, DRIZZLE_VERBOSE_INFO, format, args);
00124 va_end(args);
00125 }
00126 }
00127
00131 static inline void drizzle_log_debug(drizzle_st *drizzle, const char *format,
00132 ...)
00133 {
00134 va_list args;
00135
00136 if (drizzle->verbose >= DRIZZLE_VERBOSE_DEBUG)
00137 {
00138 va_start(args, format);
00139 drizzle_log(drizzle, DRIZZLE_VERBOSE_DEBUG, format, args);
00140 va_end(args);
00141 }
00142 }
00143
00147 static inline void drizzle_log_crazy(drizzle_st *drizzle, const char *format,
00148 ...)
00149 {
00150 va_list args;
00151
00152 if (drizzle->verbose >= DRIZZLE_VERBOSE_CRAZY)
00153 {
00154 va_start(args, format);
00155 drizzle_log(drizzle, DRIZZLE_VERBOSE_CRAZY, format, args);
00156 va_end(args);
00157 }
00158 }
00159
00162 #ifdef __cplusplus
00163 }
00164 #endif
00165
00166 #endif