This module implements a logging module with colored output. More...
This module implements a logging module with colored output.
Files | |
| file | log_module.h |
| log_module header | |
Macros | |
| #define | LOG_ERROR_ANSI_COLOR_CODE ("\033[1;31m") |
| Default ANSI color escape code for error logs. More... | |
| #define | LOG_WARNING_ANSI_COLOR_CODE ("\033[1;33m") |
| Default ANSI color escape code for warning logs. More... | |
| #define | LOG_INFO_ANSI_COLOR_CODE ("\033[1m") |
| Default ANSI color escape code for info logs. More... | |
| #define | LOG_DEBUG_ANSI_COLOR_CODE ("\033[0;32m") |
| Default ANSI color escape code for debug logs. More... | |
| #define | LOG_RESET_ANSI_COLOR_CODE ("\033[0m") |
| ANSI color escape code used for resetting color. | |
Functions | |
| static void | log_write (unsigned level, const char *format,...) |
| log_write overridden function for colored output More... | |
Variables | |
| static const char *const | _ansi_codes [] |
| ANSI color escape codes array. More... | |
| #define LOG_DEBUG_ANSI_COLOR_CODE ("\033[0;32m") |
Default ANSI color escape code for debug logs.
Default is green
Definition at line 67 of file log_module.h.
| #define LOG_ERROR_ANSI_COLOR_CODE ("\033[1;31m") |
Default ANSI color escape code for error logs.
Default is bold red
Definition at line 40 of file log_module.h.
| #define LOG_INFO_ANSI_COLOR_CODE ("\033[1m") |
Default ANSI color escape code for info logs.
Default is bold white
Definition at line 58 of file log_module.h.
| #define LOG_WARNING_ANSI_COLOR_CODE ("\033[1;33m") |
Default ANSI color escape code for warning logs.
Default is bold yellow
Definition at line 49 of file log_module.h.
|
inlinestatic |
log_write overridden function for colored output
| [in] | level | Logging level |
| [in] | format | String format to print |
Definition at line 94 of file log_module.h.
|
static |
ANSI color escape codes array.
Internal use only
Definition at line 80 of file log_module.h.