mirror of
https://gitlab.freedesktop.org/emersion/libliftoff.git
synced 2025-01-13 20:01:35 +01:00
8028aef654
Enumerating all planes to be disabled makes the log unnecessary sparse. Instead just list all planes in a single line. For that introduce new API function to log something without line break in the end and adapt the log callback function pointer. BREAKING CHANGE: log callback function arguments change.
20 lines
588 B
C
20 lines
588 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_importance verbosity);
|
|
|
|
void liftoff_log(enum liftoff_log_importance verbosity,
|
|
const char *format, ...) _LIFTOFF_ATTRIB_PRINTF(2, 3);
|
|
void liftoff_log_cnt(enum liftoff_log_importance verbosity,
|
|
const char *format, ...) _LIFTOFF_ATTRIB_PRINTF(2, 3);
|
|
void liftoff_log_errno(enum liftoff_log_importance verbosity, const char *msg);
|
|
|
|
#endif
|