diff options
author | Simon Ser <contact@emersion.fr> | 2020-08-27 15:56:14 +0000 |
---|---|---|
committer | Kenny Levinsen <kl@kl.wtf> | 2020-08-28 01:21:57 +0200 |
commit | 47d4b43f1a63ca83b7f2dd8bc7eb24f194ebb32f (patch) | |
tree | 31477317808700f412bf7b0b37cbea4b7b2552ba /include/log.h | |
parent | a254fe3692e63f92aa710310ba8113373180448c (diff) |
Introduce libseat_set_log_handler
This allows libseat users to register a custom logging function.
Diffstat (limited to 'include/log.h')
-rw-r--r-- | include/log.h | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/include/log.h b/include/log.h index ff354f8..d4bfd89 100644 --- a/include/log.h +++ b/include/log.h @@ -3,6 +3,8 @@ #include <stdarg.h> +#include "libseat.h" + #ifdef __GNUC__ #define ATTRIB_PRINTF(start, end) __attribute__((format(printf, start, end))) #else @@ -41,14 +43,6 @@ #define log_debug(str) #endif -enum libseat_log_level { - LIBSEAT_LOG_LEVEL_SILENT = 0, - LIBSEAT_LOG_LEVEL_ERROR = 1, - LIBSEAT_LOG_LEVEL_INFO = 2, - LIBSEAT_LOG_LEVEL_DEBUG = 3, - LIBSEAT_LOG_LEVEL_LAST, -}; - void log_init(enum libseat_log_level level); void _logf(enum libseat_log_level level, const char *fmt, ...) ATTRIB_PRINTF(2, 3); |