libliftoff/include/log.h
Simon Ser b08bbaa5e6 Split liftoff_log_init into set_handler and set_priority
This allows callers to change only one of those, without the other.
Also rename importance to priority and func to handler.
2021-03-31 12:44:24 +02:00

18 lines
461 B
C

#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
bool log_has(enum liftoff_log_priority priority);
void liftoff_log(enum liftoff_log_priority priority,
const char *format, ...) _LIFTOFF_ATTRIB_PRINTF(2, 3);
void liftoff_log_errno(enum liftoff_log_priority priority, const char *msg);
#endif