Change logger use color

This commit is contained in:
2023-11-01 14:01:45 +01:00
parent 0af40da311
commit 1c47eccd88
2 changed files with 8 additions and 4 deletions

View File

@@ -34,11 +34,15 @@
#define LOGGER_LEVEL 1
#endif
#ifdef LOGGER_USE_COLOR
#define LOGGER_COLOR 1
#endif
#ifndef LOGGER_LEVEL
#define LOGGER_LEVEL 3
#endif
#ifndef LOGGER_USE_COLOR
#define LOGGER_USE_COLOR 0
#ifndef LOGGER_COLOR
#define LOGGER_COLOR 0
#endif
#define ANSI_ESC "\x1B"
@@ -67,7 +71,7 @@
#define ERASE_FROM_CURSOR_TO_BEGINNING_LINE ANSI_ESC "[1K"
#define ERASE_ENTIRE_LINE ANSI_ESC "[2K"
#if LOGGER_USE_COLOR == 1
#if LOGGER_COLOR == 1
#define LOG_RESET_COLOR "\033[0m"
#define LOG_COLOR_F "\033[0;31m" // Red
#define LOG_COLOR_C "\033[0;31m" // Red