60#define LOG_LEVEL LOG_INFO
67#define LOG(level, ...) do { \
68 _Pragma("clang diagnostic push") \
69 _Pragma("clang diagnostic ignored \"-Wtautological-compare\"") \
70 if ((level) <= LOG_LEVEL) log_write((level), __VA_ARGS__); } while (0U) \
71 _Pragma("clang diagnostic pop")
73#define LOG(level, ...) do { \
74 if ((level) <= LOG_LEVEL) log_write((level), __VA_ARGS__); } while (0U)
81#define LOG_RIOT_ERROR(...) LOG(LOG_ERROR, __VA_ARGS__)
82#define LOG_RIOT_WARNING(...) LOG(LOG_WARNING, __VA_ARGS__)
83#define LOG_RIOT_INFO(...) LOG(LOG_INFO, __VA_ARGS__)
84#define LOG_RIOT_DEBUG(...) LOG(LOG_DEBUG, __VA_ARGS__)
90#define log_write(level, ...) printf(__VA_ARGS__)
@ LOG_ERROR
Error log level, will print only critical, non-recoverable errors like hardware initialization failur...
@ 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_DEBUG
Debug log level, printing developer stuff considered too verbose for production use.