Fawkes API
Fawkes Development Version
|
24 #ifndef _UTILS_LOGGING_LOGGER_H_
25 #define _UTILS_LOGGING_LOGGER_H_
27 #include <core/exception.h>
32 #if defined(FAWKES_NO_LOGGING_FORMAT_CHECK)
33 # define FAKWES_LOGGING_FORMAT_CHECK(string, arguments)
35 # define FAKWES_LOGGING_FORMAT_CHECK(string, arguments) \
36 __attribute__((__format__(printf, string, arguments)))
69 FAKWES_LOGGING_FORMAT_CHECK(4, 5)
70 virtual
void log(
LogLevel level, const
char *component, const
char *format, ...);
71 FAKWES_LOGGING_FORMAT_CHECK(3, 4)
72 virtual
void log_debug(const
char *component, const
char *format, ...) = 0;
73 FAKWES_LOGGING_FORMAT_CHECK(3, 4)
74 virtual
void log_info(const
char *component, const
char *format, ...) = 0;
75 FAKWES_LOGGING_FORMAT_CHECK(3, 4)
76 virtual
void log_warn(const
char *component, const
char *format, ...) = 0;
77 FAKWES_LOGGING_FORMAT_CHECK(3, 4)
78 virtual
void log_error(const
char *component, const
char *format, ...) = 0;
86 virtual
void vlog(
LogLevel level, const
char *component, const
char *format, va_list va);
87 virtual
void vlog_debug(const
char *component, const
char *format, va_list va) = 0;
88 virtual
void vlog_info(const
char *component, const
char *format, va_list va) = 0;
89 virtual
void vlog_warn(const
char *component, const
char *format, va_list va) = 0;
90 virtual
void vlog_error(const
char *component, const
char *format, va_list va) = 0;
92 FAKWES_LOGGING_FORMAT_CHECK(5, 6)
94 tlog(
LogLevel level, struct timeval *t, const
char *component, const
char *format, ...);
95 FAKWES_LOGGING_FORMAT_CHECK(4, 5)
96 virtual
void tlog_debug(struct timeval *t, const
char *component, const
char *format, ...) = 0;
97 FAKWES_LOGGING_FORMAT_CHECK(4, 5)
98 virtual
void tlog_info(struct timeval *t, const
char *component, const
char *format, ...) = 0;
99 FAKWES_LOGGING_FORMAT_CHECK(4, 5)
100 virtual
void tlog_warn(struct timeval *t, const
char *component, const
char *format, ...) = 0;
101 FAKWES_LOGGING_FORMAT_CHECK(4, 5)
102 virtual
void tlog_error(struct timeval *t, const
char *component, const
char *format, ...) = 0;
111 vtlog(
LogLevel level, struct timeval *t, const
char *component, const
char *format, va_list va);
113 vtlog_debug(struct timeval *t, const
char *component, const
char *format, va_list va) = 0;
115 vtlog_info(struct timeval *t, const
char *component, const
char *format, va_list va) = 0;
117 vtlog_warn(struct timeval *t, const
char *component, const
char *format, va_list va) = 0;
119 vtlog_error(struct timeval *t, const
char *component, const
char *format, va_list va) = 0;
virtual void log(LogLevel level, const char *component, const char *format,...)
Log message of given log level.
virtual void set_loglevel(LogLevel level)
Sets the log level.
virtual void vlog_debug(const char *component, const char *format, va_list va)=0
LogLevel log_level
Minimum log level.
virtual void vtlog(LogLevel level, struct timeval *t, const char *component, const char *format, va_list va)
Log message for given log level and time.
virtual void tlog_warn(struct timeval *t, const char *component, const char *format,...)=0
virtual void tlog_error(struct timeval *t, const char *component, const char *format,...)=0
virtual void log_info(const char *component, const char *format,...)=0
virtual void vlog_warn(const char *component, const char *format, va_list va)=0
virtual ~Logger()
Virtual empty destructor.
debug output, relevant only when tracking down problems
virtual void vtlog_info(struct timeval *t, const char *component, const char *format, va_list va)=0
virtual void vtlog_error(struct timeval *t, const char *component, const char *format, va_list va)=0
virtual void log_error(const char *component, const char *format,...)=0
informational output about normal procedures
virtual void tlog_info(struct timeval *t, const char *component, const char *format,...)=0
error, may be recoverable (software still running) or not (software has to terminate).
virtual void log_warn(const char *component, const char *format,...)=0
virtual void tlog_debug(struct timeval *t, const char *component, const char *format,...)=0
virtual void vtlog_debug(struct timeval *t, const char *component, const char *format, va_list va)=0
virtual void vtlog_warn(struct timeval *t, const char *component, const char *format, va_list va)=0
virtual LogLevel loglevel()
Get log level.
virtual void vlog_error(const char *component, const char *format, va_list va)=0
Logger(LogLevel log_level=LL_DEBUG)
Constructor.
virtual void vlog_info(const char *component, const char *format, va_list va)=0
use this to disable log output
warning, should be investigated but software still functions, an example is that something was reques...
virtual void tlog(LogLevel level, struct timeval *t, const char *component, const char *format,...)
Log message of given log level and time.
virtual void vlog(LogLevel level, const char *component, const char *format, va_list va)
Log message for given log level.
virtual void log_debug(const char *component, const char *format,...)=0