Logging of status messages to the terminal. More...
#include <string.h>
#include <errno.h>
#include <stdio.h>
#include <pthread.h>
Go to the source code of this file.
Macros | |
#define | ANSI_COLOR_RED "\x1b[31m" |
#define | ANSI_COLOR_GREEN "\x1b[32m" |
#define | ANSI_COLOR_YELLOW "\x1b[33m" |
#define | ANSI_COLOR_BLUE "\x1b[34m" |
#define | ANSI_COLOR_RESET "\x1b[0m" |
#define | ANSI_COLOR_PURPLE "\x1b[35m" |
#define | PICO_SUPPORT_NDEBUG |
#define | LOG_FD stderr |
Where logs are printed to. More... | |
#define | LOG_ALL 0 |
#define | log_at_level(lvl_label, color, fd, fmt,...) |
Macro utilized by all loggers. More... | |
#define | log_debug(...) |
Use of log_debug(fmt, ...) is not recommended. More... | |
#define | debug(fmt,...) log_debug(__VA_ARGS__) |
#define | log_info(fmt,...) |
#define | log_error(fmt,...) |
#define | log_perror(fmt,...) |
#define | log_warn(fmt,...) |
#define | log_critical(fmt,...) |
#define | log(level, fmt,...) |
Log at a custom level. More... | |
#define | log_profile(...) |
#define | tcp_dbg(...) |
Logging of status messages to the terminal.
The DeDOS logger supports five built-in log levels (debug, info, error, warn, and critical), in addition to custom log levels.
To enable a custom log level, simply write: log(LOG_SOMETHING, "Stuff to %s", log);
If the macro LOG_SOMETHING
is defined, "Stuff to log" will be output. Otherwise, it will be compiled away (if optimization > 0).
Definition in file logging.h.
#define log | ( | level, | |
fmt, | |||
... | |||
) |
#define log_at_level | ( | lvl_label, | |
color, | |||
fd, | |||
fmt, | |||
... | |||
) |
Macro utilized by all loggers.
#define log_debug | ( | ... | ) |