BeRTOS
|
#include <cfg/debug.h>
Go to the source code of this file.
Defines | |
#define | LOG_ERR(str,...) LOG_PRINT("ERR", str, ## __VA_ARGS__) |
Output an error message. | |
#define | LOG_ERRB(x) x |
Define a code block that will be compiled only when LOG_LEVEL >= LOG_LVL_ERR. | |
#define | LOG_WARN(str,...) LOG_PRINT("WARN", str, ## __VA_ARGS__) |
Output a warning message. | |
#define | LOG_WARNB(x) x |
Define a code block that will be compiled only when LOG_LEVEL >= LOG_LVL_WARN. | |
#define | LOG_INFO(str,...) LOG_PRINT("INFO", str, ## __VA_ARGS__) |
Output an informative message. | |
#define | LOG_INFOB(x) x |
Define a code block that will be compiled only when LOG_LEVEL >= LOG_LVL_INFO. | |
Logging level definition | |
When you choose a log level messages you choose also which print function are linked. When using a log level, you link all log functions that have a priority higher or equal than the level you chose. The priority level go from error (highest) to info (lowest). | |
#define | LOG_LVL_NONE 0 |
#define | LOG_LVL_ERR 1 |
#define | LOG_LVL_WARN 2 |
#define | LOG_LVL_INFO 3 |
Logging format | |
There are two logging format: terse and verbose. The latter prepends function names and line number information to each log entry. | |
#define | LOG_FMT_VERBOSE 1 |
#define | LOG_FMT_TERSE 0 |
Definition in file log.h.