diff options
Diffstat (limited to 'lib/include/log.h')
| -rw-r--r-- | lib/include/log.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/include/log.h b/lib/include/log.h index a8549e0..1483559 100644 --- a/lib/include/log.h +++ b/lib/include/log.h @@ -1,3 +1,6 @@ +#ifndef VL_LOG_H_INCLUDED +#define VL_LOG_H_INCLUDED + #include <stdio.h> #include <stdarg.h> @@ -7,6 +10,8 @@ #define LOG_WARN 3u #define LOG_ERROR 4u +/* Log functions MUST leave errno untouched */ + void vl_log_setlevel(unsigned level); void vl_logv(unsigned level, const char *fmt, va_list args); @@ -50,3 +55,5 @@ void vl_log(unsigned level, const char *fmt, ...) __attribute__((format(printf, #define LOG_ERROR_ENABLED #define vl_error(...) vl_log(LOG_ERROR, __VA_ARGS__) #define vl_errorv(...) vl_logv(LOG_ERROR, __VA_ARGS__) + +#endif |
