const char*file,
int line,
const char *func,
- const char *format, ...) _printf_attr(5,6);
+ const char *format, ...) _printf_attr_(5,6);
-_noreturn void log_assert(
+_noreturn_ void log_assert(
const char*file,
int line,
const char *func,
- const char *format, ...) _printf_attr(4,5);
+ const char *format, ...) _printf_attr_(4,5);
+
+/* This modifies the buffer passed! */
+int log_dump_internal(
+ int level,
+ const char*file,
+ int line,
+ const char *func,
+ char *buffer);
#define log_debug(...) log_meta(LOG_DEBUG, __FILE__, __LINE__, __func__, __VA_ARGS__)
#define log_info(...) log_meta(LOG_INFO, __FILE__, __LINE__, __func__, __VA_ARGS__)
#define log_warning(...) log_meta(LOG_WARNING, __FILE__, __LINE__, __func__, __VA_ARGS__)
#define log_error(...) log_meta(LOG_ERR, __FILE__, __LINE__, __func__, __VA_ARGS__)
+/* This modifies the buffer passed! */
+#define log_dump(level, buffer) log_dump_internal(level, __FILE__, __LINE__, __func__, buffer)
+
const char *log_target_to_string(LogTarget target);
LogTarget log_target_from_string(const char *s);