00001 00018 #ifndef RAZORBACK_LOG_H 00019 #define RAZORBACK_LOG_H 00020 00021 #ifdef __cplusplus 00022 extern "C" { 00023 #endif 00024 00025 #ifdef _MSC_VER 00026 #define LOG_EMERG 0 00027 #define LOG_EMERGE 0 00028 #define LOG_ALERT 1 00029 #define LOG_CRIT 2 00030 #define LOG_ERR 3 00031 #define LOG_WARNING 4 00032 #define LOG_NOTICE 5 00033 #define LOG_INFO 6 00034 #define LOG_DEBUG 7 00035 00036 #else //_MSC_VER 00037 #include <syslog.h> 00038 #endif 00039 00040 #include <razorback/visibility.h> 00041 #include <razorback/types.h> 00042 00043 00046 typedef enum 00047 { 00048 RZB_LOG_DEST_FILE, 00049 RZB_LOG_DEST_SYSLOG, 00050 RZB_LOG_DEST_ERR, 00051 } RZB_LOG_DEST_t; 00052 00058 SO_PUBLIC extern void rzb_log (unsigned level, const char *fmt, ...); 00059 SO_PUBLIC extern void 00060 rzb_log_remote (uint8_t level, struct EventId *eventId, const char *fmt, ...); 00061 00065 SO_PUBLIC extern void rzb_perror (const char *message); 00066 00070 SO_PUBLIC extern int rzb_get_log_level (); 00071 00075 SO_PUBLIC extern RZB_LOG_DEST_t rzb_get_log_dest (); 00076 00079 SO_PUBLIC extern void rzb_debug_logging (); 00080 #ifdef __cplusplus 00081 } 00082 #endif 00083 #endif // RAZORBACK_LOG_H