00001 #ifndef TEMU_LOGGING_H
00002 #define TEMU_LOGGING_H
00003
00042 #ifdef __cplusplus
00043 extern "C" {
00044 #endif
00045
00046
00051 typedef enum temu_LogLevel {
00052 teLL_Critical,
00053 teLL_Error,
00054 teLL_Warning,
00055 teLL_Info,
00056 teLL_Debug,
00057 } temu_LogLevel;
00058
00065 void temu_logSetLevel(temu_LogLevel LogLevel);
00066
00080 void temu_logSetFunc(void (*LogFunc)(const char *));
00081
00084 void temu_logCritical(const void *Obj, const char *Msg, ...)
00085 __attribute__((noreturn))
00086 __attribute__((format(printf, 2, 3)));
00087
00088 void temu_logError(const void *Obj, const char *Msg, ...)
00089 __attribute__((format(printf, 2, 3)));
00090
00091 void temu_logWarning(const void *Obj, const char *Msg, ...)
00092 __attribute__((format(printf, 2, 3)));
00093
00094 void temu_logInfo(const void *Obj, const char *Msg, ...)
00095 __attribute__((format(printf, 2, 3)));
00096
00097 void temu_logDebugFunc(const void *Obj, const char *Msg, ...)
00098 __attribute__((format(printf, 2, 3)));
00099
00100 #if NDEBUG
00101 static inline void
00102 temu_logDebug(const void *Obj, const char *Msg, ...)
00103 {
00104 ;
00105 }
00106
00107 #else
00108
00109 void temu_logDebug(const void *Obj, const char *Msg, ...)
00110 __attribute__((format(printf, 2, 3)));
00111
00112 #endif
00113
00114 #ifdef __cplusplus
00115 }
00116 #endif
00117
00118 #endif