Main Page | Alphabetical List | Data Structures | File List | Data Fields | Globals

log.h

Go to the documentation of this file.
00001 /* -*- C -*- */
00002 #ifndef LOG_H
00003 #define LOG_H
00004 
00005 #include <stdarg.h>
00006 
00011 enum LogLevel {
00012     LOG_LEVEL_ANY = 0,          
00013     LOG_LEVEL_DEBUG = 1,        
00014     LOG_LEVEL_INFO = 2,         
00015     LOG_LEVEL_WARNING = 3,      
00016     LOG_LEVEL_ERROR = 4,        
00017     LOG_LEVEL_FATAL = 5         
00018 };
00019 
00020 
00035 typedef void (* LogHandler) (int level, const char *domain, const char *message);
00036 
00041 void log_initialize(const char *domain);
00042 void log_remove_handlers();
00043 void log_add_handler(LogHandler handler, int level);
00044 
00045 void log_info(const char *format, ...);
00046 void log_debug(const char *format, ...);
00047 void log_error(const char *format, ...);
00048 void log_perror(const char *message);
00049 void log_fatal(const char *format, ...);
00050 void log_warning(const char *format, ...);
00051 void log_vwrite(int level, const char *format, va_list args);
00052 const char *log_translate_level(int level) ;
00053 int log_translate_string(const char *level_string);
00054 
00055 void log_syslog_handler(int level, const char *domain, const char *message);
00056 void log_console_handler(int level, const char *domain, const char *message);
00057 
00058 
00059 
00060 #endif

Generated on Fri Jan 20 10:12:18 2006 by  doxygen 1.4.2