mirror of
https://gitlab.freedesktop.org/emersion/libliftoff.git
synced 2024-12-27 21:59:24 +01:00
c05f290f95
Instead of exposing to consumers write streaming log data into a per-device buffer that gets created on request and destroyed after the buffer has been written to the log. Passing a NULL string to the internal continuous log function triggers a write of the buffer to the log. BREAKING CHANGE: continuous log function is moved from log header to private header.
21 lines
572 B
C
21 lines
572 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_errno(enum liftoff_log_importance verbosity, const char *msg);
|
|
|
|
void debug_cnt(struct liftoff_device *device, const char *format, ...)
|
|
_LIFTOFF_ATTRIB_PRINTF(2, 3);
|
|
|
|
#endif
|