From f642fa64289b6860fc96c66e97466d3720ead535 Mon Sep 17 00:00:00 2001 From: daniel-k Date: Tue, 23 Jan 2018 14:42:26 +0100 Subject: [PATCH] log: provide more macros for text colors --- fpga/include/villas/log.hpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/fpga/include/villas/log.hpp b/fpga/include/villas/log.hpp index 8a7a84bad..656d24313 100644 --- a/fpga/include/villas/log.hpp +++ b/fpga/include/villas/log.hpp @@ -9,7 +9,16 @@ #include #define _ESCAPE "\x1b" -#define TXT_BOLD(s) _ESCAPE "[1m" + std::string(s) + _ESCAPE "[0m" +#define TXT_RESET_ALL _ESCAPE "[0m" + +#define TXT_RESET_BOLD _ESCAPE "[21m" +#define TXT_BOLD(s) _ESCAPE "[1m" + std::string(s) + TXT_RESET_BOLD + +#define TXT_RESET_COLOR _ESCAPE "[39m" +#define TXT_RED(s) _ESCAPE "[31m" + std::string(s) + TXT_RESET_COLOR +#define TXT_GREEN(s) _ESCAPE "[32m" + std::string(s) + TXT_RESET_COLOR +#define TXT_YELLOW(s) _ESCAPE "[33m" + std::string(s) + TXT_RESET_COLOR +#define TXT_BLUE(s) _ESCAPE "[34m" + std::string(s) + TXT_RESET_COLOR using SpdLogger = std::shared_ptr;