T-EMU  2
The Terma Emulator
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
Logging.h
Go to the documentation of this file.
1 #ifndef TEMU_LOGGING_H
2 #define TEMU_LOGGING_H
3 
42 #ifdef __cplusplus
43 extern "C" {
44 #endif
45 
46 
51 typedef enum temu_LogLevel {
58 
65 void temu_logSetLevel(temu_LogLevel LogLevel);
66 
80 void temu_logSetFunc(void (*LogFunc)(const char *));
81 
84 void temu_logCritical(const void *Obj, const char *Msg, ...)
85  __attribute__((noreturn))
86  __attribute__((format(printf, 2, 3)));
87 
88 void temu_logError(const void *Obj, const char *Msg, ...)
89  __attribute__((format(printf, 2, 3)));
90 
91 void temu_logWarning(const void *Obj, const char *Msg, ...)
92  __attribute__((format(printf, 2, 3)));
93 
94 void temu_logInfo(const void *Obj, const char *Msg, ...)
95  __attribute__((format(printf, 2, 3)));
96 
97 void temu_logDebugFunc(const void *Obj, const char *Msg, ...)
98  __attribute__((format(printf, 2, 3)));
99 
100 #if NDEBUG
101 static inline void
102 temu_logDebug(const void *Obj, const char *Msg, ...)
103 {
104  ; // Nothing
105 }
106 
107 #else
108 
109 void temu_logDebug(const void *Obj, const char *Msg, ...)
110  __attribute__((format(printf, 2, 3)));
111 
112 #endif
113 
114 #ifdef __cplusplus
115 }
116 #endif
117 
118 #endif /* ! TEMU_LOGGING_H */
Debug.
Definition: Logging.h:56
void temu_logCritical(const void *Obj, const char *Msg,...) __attribute__((format(printf
Normal messages.
Definition: Logging.h:55
void void void void void void temu_logDebug(const void *Obj, const char *Msg,...) __attribute__((format(printf
void void void temu_logWarning(const void *Obj, const char *Msg,...) __attribute__((format(printf
void temu_logSetFunc(void(*LogFunc)(const char *))
Warnings.
Definition: Logging.h:54
Error happened, in principle critical but up to user.
Definition: Logging.h:53
void void void void temu_logInfo(const void *Obj, const char *Msg,...) __attribute__((format(printf
void void void void void temu_logDebugFunc(const void *Obj, const char *Msg,...) __attribute__((format(printf
void void temu_logError(const void *Obj, const char *Msg,...) __attribute__((format(printf
temu_LogLevel
Definition: Logging.h:51
void temu_logSetLevel(temu_LogLevel LogLevel)
Critical, emulator cannot keep on running.
Definition: Logging.h:52