Apama  10.3.1.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
AP_Logger.h
Go to the documentation of this file.
1 
13 #ifndef AP_LOGGER_H
14 #define AP_LOGGER_H
15 
16 
17 #include <AP_Platform.h>
18 #include <stdarg.h>
19 
30  AP_LogLevel_NULL,
31  AP_LogLevel_OFF,
32  AP_LogLevel_FORCE,
33  AP_LogLevel_CRIT,
34  AP_LogLevel_FATAL,
35  AP_LogLevel_ERROR,
36  AP_LogLevel_WARN,
37  AP_LogLevel_INFO,
38  AP_LogLevel_DEBUG,
39  AP_LogLevel_TRACE
40 };
41 
42 
43 #ifdef __cplusplus
44 extern "C" {
45 #endif /* __cplusplus */
46 
56  AP_COMMON_API void AP_COMMON_CALL AP_LogTrace(const char* message, ...)
57 #ifdef __GNUC__
58  __attribute__ ((format (printf, 1, 2)))
59 #endif
60  ;
61 
71  AP_COMMON_API void AP_COMMON_CALL AP_LogDebug(const char* message, ...)
72 #ifdef __GNUC__
73  __attribute__ ((format (printf, 1, 2)))
74 #endif
75  ;
76 
86  AP_COMMON_API void AP_COMMON_CALL AP_LogInfo(const char* message, ...)
87 #ifdef __GNUC__
88  __attribute__ ((format (printf, 1, 2)))
89 #endif
90  ;
91 
101  AP_COMMON_API void AP_COMMON_CALL AP_LogWarn(const char* message, ...)
102 #ifdef __GNUC__
103  __attribute__ ((format (printf, 1, 2)))
104 #endif
105  ;
106 
116  AP_COMMON_API void AP_COMMON_CALL AP_LogError(const char* message, ...)
117 #ifdef __GNUC__
118  __attribute__ ((format (printf, 1, 2)))
119 #endif
120  ;
121 
129  AP_COMMON_API void AP_COMMON_CALL AP_LogForce(const char* message, ...)
130 #ifdef __GNUC__
131  __attribute__ ((format (printf, 1, 2)))
132 #endif
133  ;
134 
144  AP_COMMON_API void AP_COMMON_CALL AP_LogCrit(const char* message, ...)
145 #ifdef __GNUC__
146  __attribute__ ((format (printf, 1, 2)))
147 #endif
148  ;
149 
159  AP_COMMON_API void AP_COMMON_CALL AP_LogFatal(const char* message, ...)
160 #ifdef __GNUC__
161  __attribute__ ((format (printf, 1, 2)))
162 #endif
163  ;
164 
177  AP_COMMON_API void AP_COMMON_CALL AP_DoLog(enum AP_LogLevel level, const char* message, va_list args)
178 #ifdef __GNUC__
179  __attribute__ ((format (printf, 2, 0)))
180 #endif
181  ;
182 
193  AP_COMMON_API void AP_COMMON_CALL AP_DoLogV(enum AP_LogLevel level, const char* message, ...)
194 #ifdef __GNUC__
195  __attribute__ ((format (printf, 2, 3)))
196 #endif
197  ;
198 
210  AP_COMMON_API enum AP_LogLevel AP_COMMON_CALL AP_StringToLogLevel(const char* str);
211 
221  AP_COMMON_API const char* AP_COMMON_CALL AP_LogLevelToString(enum AP_LogLevel level);
222 
228  AP_COMMON_API enum AP_LogLevel AP_COMMON_CALL AP_GetLogLevel();
229 
238  AP_COMMON_API const char* AP_COMMON_CALL AP_GetLogFileName();
239 
240  AP_COMMON_API int AP_COMMON_CALL AP_GetLogFD();
241 
250  AP_COMMON_API const char* AP_COMMON_CALL AP_GetUTF8LogFileName();
251 
252 
253 #ifdef __cplusplus
254 } /* extern "C" */
255 #endif /* __cplusplus */
256 
257 
258 #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:29
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.