Yder Logging library written in C

yder.h
Go to the documentation of this file.
1
27 #ifndef __YDER_H__
28 #define __YDER_H__
29
30 #ifdef __cplusplus
31 extern "C"
32 {
33 #endif
34
35 #include "yder-cfg.h"
36
37 #include <time.h>
38
44 #define Y_LOG_MODE_NONE 0x00000000
45 #define Y_LOG_MODE_CONSOLE 0x000000F0
46 #define Y_LOG_MODE_SYSLOG 0x00000F00
47 #define Y_LOG_MODE_FILE 0x0000F000
48 #define Y_LOG_MODE_JOURNALD 0x000F0000
49 #define Y_LOG_MODE_CALLBACK 0x00F00000
50 #define Y_LOG_MODE_CURRENT 0xFFFFFFFF
51
52 #define Y_LOG_LEVEL_NONE 0x0000
53 #define Y_LOG_LEVEL_ERROR 0x000F
54 #define Y_LOG_LEVEL_WARNING 0x00F0
55 #define Y_LOG_LEVEL_INFO 0x0F00
56 #define Y_LOG_LEVEL_DEBUG 0xF000
57 #define Y_LOG_LEVEL_CURRENT 0xFFFF
58
80 int y_init_logs(const char * app, const unsigned long init_mode, const unsigned long init_level, const char * init_log_file, const char * message);
81
90 int y_set_logs_callback(void (* y_callback_log_message) (void * cls, const char * app_name, const time_t date, const unsigned long level, const char * message),
91 void * cls,
92 const char * message);
93
101 int y_set_date_format(const char * format, const char * message);
102
107 int y_close_logs();
108
124 void y_log_message(const unsigned long type, const char * message, ...);
125
130 #ifdef __cplusplus
131 }
132 #endif
133
134 #endif // __YDER_H__
y_close_logs
int y_close_logs()
Definition: yder.c:365
y_set_logs_callback
int y_set_logs_callback(void(*y_callback_log_message)(void *cls, const char *app_name, const time_t date, const unsigned long level, const char *message), void *cls, const char *message)
Definition: yder.c:341
y_init_logs
int y_init_logs(const char *app, const unsigned long init_mode, const unsigned long init_level, const char *init_log_file, const char *message)
Definition: yder.c:319
y_set_date_format
int y_set_date_format(const char *format, const char *message)
Definition: yder.c:354
y_log_message
void y_log_message(const unsigned long type, const char *message,...)
Definition: yder.c:372