Apama  10.15.0.2
AP_Logger.h
Go to the documentation of this file.
1 
12 #ifndef AP_LOGGER_H
13 #define AP_LOGGER_H
14 
15 
16 #include <AP_Platform.h>
17 #include <stdarg.h>
18 
29  AP_LogLevel_NULL,
30  AP_LogLevel_OFF,
31  AP_LogLevel_FORCE,
32  AP_LogLevel_CRIT,
33  AP_LogLevel_FATAL,
34  AP_LogLevel_ERROR,
35  AP_LogLevel_WARN,
36  AP_LogLevel_INFO,
37  AP_LogLevel_DEBUG,
38  AP_LogLevel_TRACE
39 };
40 
41 
42 #ifdef __cplusplus
43 extern "C" {
44 #endif /* __cplusplus */
45 
55  AP_COMMON_API void AP_COMMON_CALL AP_LogTrace(const char* message, ...)
56 #ifdef __GNUC__
57  __attribute__ ((format (printf, 1, 2)))
58 #endif
59  ;
60 
70  AP_COMMON_API void AP_COMMON_CALL AP_LogDebug(const char* message, ...)
71 #ifdef __GNUC__
72  __attribute__ ((format (printf, 1, 2)))
73 #endif
74  ;
75 
85  AP_COMMON_API void AP_COMMON_CALL AP_LogInfo(const char* message, ...)
86 #ifdef __GNUC__
87  __attribute__ ((format (printf, 1, 2)))
88 #endif
89  ;
90 
100  AP_COMMON_API void AP_COMMON_CALL AP_LogWarn(const char* message, ...)
101 #ifdef __GNUC__
102  __attribute__ ((format (printf, 1, 2)))
103 #endif
104  ;
105 
115  AP_COMMON_API void AP_COMMON_CALL AP_LogError(const char* message, ...)
116 #ifdef __GNUC__
117  __attribute__ ((format (printf, 1, 2)))
118 #endif
119  ;
120 
128  AP_COMMON_API void AP_COMMON_CALL AP_LogForce(const char* message, ...)
129 #ifdef __GNUC__
130  __attribute__ ((format (printf, 1, 2)))
131 #endif
132  ;
133 
143  AP_COMMON_API void AP_COMMON_CALL AP_LogCrit(const char* message, ...)
144 #ifdef __GNUC__
145  __attribute__ ((format (printf, 1, 2)))
146 #endif
147  ;
148 
158  AP_COMMON_API void AP_COMMON_CALL AP_LogFatal(const char* message, ...)
159 #ifdef __GNUC__
160  __attribute__ ((format (printf, 1, 2)))
161 #endif
162  ;
163 
176  AP_COMMON_API void AP_COMMON_CALL AP_DoLog(enum AP_LogLevel level, const char* message, va_list args)
177 #ifdef __GNUC__
178  __attribute__ ((format (printf, 2, 0)))
179 #endif
180  ;
181 
192  AP_COMMON_API void AP_COMMON_CALL AP_DoLogV(enum AP_LogLevel level, const char* message, ...)
193 #ifdef __GNUC__
194  __attribute__ ((format (printf, 2, 3)))
195 #endif
196  ;
197 
209  AP_COMMON_API enum AP_LogLevel AP_COMMON_CALL AP_StringToLogLevel(const char* str);
210 
220  AP_COMMON_API const char* AP_COMMON_CALL AP_LogLevelToString(enum AP_LogLevel level);
221 
227  AP_COMMON_API enum AP_LogLevel AP_COMMON_CALL AP_GetLogLevel();
228 
237  AP_COMMON_API const char* AP_COMMON_CALL AP_GetLogFileName();
238 
239  AP_COMMON_API int AP_COMMON_CALL AP_GetLogFD();
240 
249  AP_COMMON_API const char* AP_COMMON_CALL AP_GetUTF8LogFileName();
250 
251 
252 #ifdef __cplusplus
253 } /* extern "C" */
254 #endif /* __cplusplus */
255 
256 
257 #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:28
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.