Remove color escape sequences in log messages
They cause more grief than they're worth Define `LOG_WITH_COLORS` to re-enable them
This commit is contained in:
+14
-6
@@ -100,12 +100,20 @@ extern "C" {
|
||||
/* .log_format = 0x13 uncolored standard messages
|
||||
* .log_format = 0x93 colored standard messages */
|
||||
/* keep white space in first position; switching it to 0 allows colors to be disabled*/
|
||||
#define LOG_RED "\033[0m" /*[1;31m" !< \brief VT100 sequence for bold red foreground */
|
||||
#define LOG_GREEN "\033[0m" /*[32m" !< \brief VT100 sequence for green foreground */
|
||||
#define LOG_ORANGE "\033[0m" /*[93m" !< \brief VT100 sequence for orange foreground */
|
||||
#define LOG_BLUE "\033[0m" /*[34m" !< \brief VT100 sequence for blue foreground */
|
||||
#define LOG_CYBL "\033[0m" /*[40;36m" !< \brief VT100 sequence for cyan foreground on black background */
|
||||
#define LOG_RESET "\033[0m" /*!< \brief VT100 sequence for reset (black) foreground */
|
||||
#if LOG_WITH_COLORS
|
||||
#define LOG_RED "\033[1;31m" /*!< \brief VT100 sequence for bold red foreground */
|
||||
#define LOG_GREEN "\033[32m" /*!< \brief VT100 sequence for green foreground */
|
||||
#define LOG_ORANGE "\033[93m" /*!< \brief VT100 sequence for orange foreground */
|
||||
#define LOG_BLUE "\033[34m" /*!< \brief VT100 sequence for blue foreground */
|
||||
#define LOG_CYBL "\033[40;36m" /*!< \brief VT100 sequence for cyan foreground on black background */
|
||||
#else
|
||||
#define LOG_RED ""
|
||||
#define LOG_GREEN ""
|
||||
#define LOG_ORANGE ""
|
||||
#define LOG_BLUE ""
|
||||
#define LOG_CYBL ""
|
||||
#define LOG_RESET ""
|
||||
#endif
|
||||
/* @}*/
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user