ReactOS 0.4.17-dev-684-ga6524ef
log.h
Go to the documentation of this file.
1#pragma once
2
3#include <uacpi/kernel_api.h>
5#include <uacpi/log.h>
6
7#ifdef UACPI_FORMATTED_LOGGING
8#define uacpi_log uacpi_kernel_log
9#else
12#endif
13
14#ifndef UACPI_START_OF_LOG_MSG
15#define UACPI_START_OF_LOG_MSG
16#endif
17
18#ifndef UACPI_END_OF_LOG_MSG
19#define UACPI_END_OF_LOG_MSG "\n"
20#endif
21
22#define uacpi_log_lvl(lvl, fmt, ...) \
23 do { \
24 if (uacpi_should_log(lvl)) \
25 uacpi_log( \
26 lvl, \
27 UACPI_START_OF_LOG_MSG fmt UACPI_END_OF_LOG_MSG \
28 , ##__VA_ARGS__ \
29 ); \
30 } while (0)
31
32#define uacpi_debug(...) uacpi_log_lvl(UACPI_LOG_DEBUG, __VA_ARGS__)
33#define uacpi_trace(...) uacpi_log_lvl(UACPI_LOG_TRACE, __VA_ARGS__)
34#define uacpi_info(...) uacpi_log_lvl(UACPI_LOG_INFO, __VA_ARGS__)
35#define uacpi_warn(...) uacpi_log_lvl(UACPI_LOG_WARN, __VA_ARGS__)
36#define uacpi_error(...) uacpi_log_lvl(UACPI_LOG_ERROR, __VA_ARGS__)
37
void uacpi_log(uacpi_log_level, const uacpi_char *,...)
Definition: stdlib.c:700
void uacpi_logger_initialize(void)
Definition: uacpi.c:36
uacpi_log_level
Definition: log.h:7
#define UACPI_PRINTF_DECL(fmt_idx, args_idx)
Definition: compiler.h:96
char uacpi_char
Definition: types.h:44
#define const
Definition: zconf.h:233