2019-10-07 08:47:53 +02:00
|
|
|
#ifndef LOG_H
|
|
|
|
#define LOG_H
|
|
|
|
|
|
|
|
#include <libliftoff.h>
|
|
|
|
|
|
|
|
#ifdef __GNUC__
|
|
|
|
#define _LIFTOFF_ATTRIB_PRINTF(start, end) __attribute__((format(printf, start, end)))
|
|
|
|
#else
|
|
|
|
#define _LIFTOFF_ATTRIB_PRINTF(start, end)
|
|
|
|
#endif
|
|
|
|
|
2020-02-26 10:25:05 +01:00
|
|
|
bool log_has(enum liftoff_log_importance verbosity);
|
|
|
|
|
2019-10-07 08:47:53 +02:00
|
|
|
void liftoff_log(enum liftoff_log_importance verbosity,
|
|
|
|
const char *format, ...) _LIFTOFF_ATTRIB_PRINTF(2, 3);
|
2020-02-29 02:51:17 +01:00
|
|
|
void liftoff_log_formatted(enum liftoff_log_importance verbosity,
|
|
|
|
enum liftoff_log_flags flags,
|
|
|
|
const char *format, ...) _LIFTOFF_ATTRIB_PRINTF(3, 4);
|
2019-10-19 12:35:14 +02:00
|
|
|
void liftoff_log_errno(enum liftoff_log_importance verbosity, const char *msg);
|
2019-10-07 08:47:53 +02:00
|
|
|
|
2020-02-29 02:04:26 +01:00
|
|
|
void debug_cnt(struct liftoff_device *device, const char *format, ...)
|
|
|
|
_LIFTOFF_ATTRIB_PRINTF(2, 3);
|
2020-02-29 02:51:17 +01:00
|
|
|
void debug_end(struct liftoff_device *device, enum liftoff_log_flags flags);
|
2020-02-29 02:04:26 +01:00
|
|
|
|
2019-10-07 08:47:53 +02:00
|
|
|
#endif
|