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