log.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef __BG_LOG_H_
00023 #define __BG_LOG_H_
00024
00025
00026
00027 #include <gmerlin/parameter.h>
00028 #include <gmerlin/msgqueue.h>
00029
00030 #include <libintl.h>
00031
00051 typedef enum
00052 {
00053 BG_LOG_DEBUG = 1<<0,
00054 BG_LOG_WARNING = 1<<1,
00055 BG_LOG_ERROR = 1<<2,
00056 BG_LOG_INFO = 1<<3
00057 } bg_log_level_t;
00058
00059 #define BG_LOG_LEVEL_MAX (1<<3)
00060
00075 void bg_log_notranslate(bg_log_level_t level, const char * domain,
00076 const char * format, ...) __attribute__ ((format (printf, 3, 4)));
00077
00092 void bg_logs_notranslate(bg_log_level_t level, const char * domain,
00093 const char * str);
00094
00095
00096
00112 void bg_log_translate(const char * translation_domain,
00113 bg_log_level_t level, const char * domain,
00114 const char * format, ...) __attribute__ ((format (printf, 4, 5)));
00115
00120 #define bg_log(level, domain, ...) \
00121 bg_log_translate(PACKAGE, level, domain, __VA_ARGS__)
00122
00123
00139 void bg_log_set_dest(bg_msg_queue_t * q);
00140
00147 const char * bg_log_level_to_string(bg_log_level_t level);
00148
00157 void bg_log_set_verbose(int mask);
00158
00167 char * bg_log_last_error();
00168
00169 #endif // __BG_LOG_H_