1#pragma once
2
3#include <uacpi/kernel_api.h>
4#include <uacpi/internal/context.h>
5#include <uacpi/log.h>
6
7#ifdef UACPI_FORMATTED_LOGGING
8#define uacpi_log uacpi_kernel_log
9#else
10UACPI_PRINTF_DECL(2, 3)
11void uacpi_log(uacpi_log_level, const uacpi_char*, ...);
12#endif
13
14#define uacpi_log_lvl(lvl, ...) \
15 do { if (uacpi_should_log(lvl)) uacpi_log(lvl, __VA_ARGS__); } while (0)
16
17#define uacpi_debug(...) uacpi_log_lvl(UACPI_LOG_DEBUG, __VA_ARGS__)
18#define uacpi_trace(...) uacpi_log_lvl(UACPI_LOG_TRACE, __VA_ARGS__)
19#define uacpi_info(...) uacpi_log_lvl(UACPI_LOG_INFO, __VA_ARGS__)
20#define uacpi_warn(...) uacpi_log_lvl(UACPI_LOG_WARN, __VA_ARGS__)
21#define uacpi_error(...) uacpi_log_lvl(UACPI_LOG_ERROR, __VA_ARGS__)
22
23void uacpi_logger_initialize(void);
24