Apama  10.15.6.0
AP_Logger.h
Go to the documentation of this file.
1 
11 #ifndef AP_LOGGER_H
12 #define AP_LOGGER_H
13 
14 
15 #include <AP_Platform.h>
16 #include <stdarg.h>
17 
28  AP_LogLevel_NULL,
29  AP_LogLevel_OFF,
30  AP_LogLevel_FORCE,
31  AP_LogLevel_CRIT,
32  AP_LogLevel_FATAL,
33  AP_LogLevel_ERROR,
34  AP_LogLevel_WARN,
35  AP_LogLevel_INFO,
36  AP_LogLevel_DEBUG,
37  AP_LogLevel_TRACE
38 };
39 
40 
41 #ifdef __cplusplus
42 extern "C" {
43 #endif /* __cplusplus */
44 
54  AP_COMMON_API void AP_COMMON_CALL AP_LogTrace(const char* message, ...)
55 #ifdef __GNUC__
56  __attribute__ ((format (printf, 1, 2)))
57 #endif
58  ;
59 
69  AP_COMMON_API void AP_COMMON_CALL AP_LogDebug(const char* message, ...)
70 #ifdef __GNUC__
71  __attribute__ ((format (printf, 1, 2)))
72 #endif
73  ;
74 
84  AP_COMMON_API void AP_COMMON_CALL AP_LogInfo(const char* message, ...)
85 #ifdef __GNUC__
86  __attribute__ ((format (printf, 1, 2)))
87 #endif
88  ;
89 
99  AP_COMMON_API void AP_COMMON_CALL AP_LogWarn(const char* message, ...)
100 #ifdef __GNUC__
101  __attribute__ ((format (printf, 1, 2)))
102 #endif
103  ;
104 
114  AP_COMMON_API void AP_COMMON_CALL AP_LogError(const char* message, ...)
115 #ifdef __GNUC__
116  __attribute__ ((format (printf, 1, 2)))
117 #endif
118  ;
119 
127  AP_COMMON_API void AP_COMMON_CALL AP_LogForce(const char* message, ...)
128 #ifdef __GNUC__
129  __attribute__ ((format (printf, 1, 2)))
130 #endif
131  ;
132 
142  AP_COMMON_API void AP_COMMON_CALL AP_LogCrit(const char* message, ...)
143 #ifdef __GNUC__
144  __attribute__ ((format (printf, 1, 2)))
145 #endif
146  ;
147 
157  AP_COMMON_API void AP_COMMON_CALL AP_LogFatal(const char* message, ...)
158 #ifdef __GNUC__
159  __attribute__ ((format (printf, 1, 2)))
160 #endif
161  ;
162 
175  AP_COMMON_API void AP_COMMON_CALL AP_DoLog(enum AP_LogLevel level, const char* message, va_list args)
176 #ifdef __GNUC__
177  __attribute__ ((format (printf, 2, 0)))
178 #endif
179  ;
180 
191  AP_COMMON_API void AP_COMMON_CALL AP_DoLogV(enum AP_LogLevel level, const char* message, ...)
192 #ifdef __GNUC__
193  __attribute__ ((format (printf, 2, 3)))
194 #endif
195  ;
196 
208  AP_COMMON_API enum AP_LogLevel AP_COMMON_CALL AP_StringToLogLevel(const char* str);
209 
219  AP_COMMON_API const char* AP_COMMON_CALL AP_LogLevelToString(enum AP_LogLevel level);
220 
226  AP_COMMON_API enum AP_LogLevel AP_COMMON_CALL AP_GetLogLevel();
227 
236  AP_COMMON_API const char* AP_COMMON_CALL AP_GetLogFileName();
237 
238  AP_COMMON_API int AP_COMMON_CALL AP_GetLogFD();
239 
248  AP_COMMON_API const char* AP_COMMON_CALL AP_GetUTF8LogFileName();
249 
250 
251 #ifdef __cplusplus
252 } /* extern "C" */
253 #endif /* __cplusplus */
254 
255 
256 #endif /* AP_LOGGER_H */
AP_COMMON_API void AP_COMMON_CALL AP_LogInfo(const char *message,...)
Log a message at INFO level.
AP_COMMON_API void AP_COMMON_CALL AP_LogError(const char *message,...)
Log a message at ERROR level.
AP_COMMON_API void AP_COMMON_CALL AP_LogForce(const char *message,...)
Always log a message.
AP_COMMON_API enum AP_LogLevel AP_COMMON_CALL AP_StringToLogLevel(const char *str)
Utility function to convert a character string to a logging verbosity level from the AP_LogLevel enum...
AP_COMMON_API void AP_COMMON_CALL AP_LogTrace(const char *message,...)
Log a message at TRACE level.
AP_COMMON_API enum AP_LogLevel AP_COMMON_CALL AP_GetLogLevel()
Get the current logging level.
AP_COMMON_API void AP_COMMON_CALL AP_LogWarn(const char *message,...)
Log a message at WARN level.
AP_COMMON_API void AP_COMMON_CALL AP_DoLogV(enum AP_LogLevel level, const char *message,...)
Log a message at a specific log level.
AP_LogLevel
Enumeration of logging verbosity levels.
Definition: AP_Logger.h:27
AP_COMMON_API const char *AP_COMMON_CALL AP_LogLevelToString(enum AP_LogLevel level)
Utility function to convert a logging verbosity level from the AP_LogLevel enumeration to a human-rea...
AP_COMMON_API void AP_COMMON_CALL AP_LogCrit(const char *message,...)
Log a message at CRIT level.
AP_COMMON_API void AP_COMMON_CALL AP_LogDebug(const char *message,...)
Log a message at DEBUG level.
AP_COMMON_API void AP_COMMON_CALL AP_DoLog(enum AP_LogLevel level, const char *message, va_list args)
Log a message at a specific log level.
AP_COMMON_API const char *AP_COMMON_CALL AP_GetLogFileName()
Get the current logging destination.
AP_COMMON_API void AP_COMMON_CALL AP_LogFatal(const char *message,...)
Log a message at FATAL level.
AP_COMMON_API const char *AP_COMMON_CALL AP_GetUTF8LogFileName()
Get the current logging destination.