Go to the documentation of this file.
70 #define LOG_LEVEL LOG_INFO
77 #define LOG(level, ...) do { \
78 _Pragma("clang diagnostic push") \
79 _Pragma("clang diagnostic ignored \"-Wtautological-compare\"") \
80 if ((level) <= LOG_LEVEL) log_write((level), __VA_ARGS__); } while (0U) \
81 _Pragma("clang diagnostic pop")
83 #define LOG(level, ...) do { \
84 if ((level) <= LOG_LEVEL) log_write((level), __VA_ARGS__); } while (0U)
91 #define LOG_ERROR(...) LOG(LOG_ERROR, __VA_ARGS__)
92 #define LOG_WARNING(...) LOG(LOG_WARNING, __VA_ARGS__)
93 #define LOG_INFO(...) LOG(LOG_INFO, __VA_ARGS__)
94 #define LOG_DEBUG(...) LOG(LOG_DEBUG, __VA_ARGS__)
98 #include "log_module.h"
105 #define log_write(level, ...) printf(__VA_ARGS__)
@ LOG_INFO
Informational log level, will print purely informational messages like successful system bootup,...
@ LOG_NONE
Lowest log level, will output nothing.
@ LOG_ALL
print everything
@ LOG_WARNING
Warning log level, will print warning messages for temporary errors.
@ LOG_ERROR
Error log level, will print only critical, non-recoverable errors like hardware initialization failur...
@ LOG_DEBUG
Debug log level, printing developer stuff considered too verbose for production use.