aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/utils/log.cpp
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2019-05-06 10:25:40 -0700
committermichael-west <michael.west@ettus.com>2019-05-21 21:37:19 -0700
commit32ececbf36508a374d471ea370897b1c17cf1294 (patch)
tree25148e902ee18a430daa48a101775cf5d2775bf9 /host/lib/utils/log.cpp
parent03d72eee1afd2a25507cd83c966be6a578ac9e37 (diff)
downloaduhd-32ececbf36508a374d471ea370897b1c17cf1294.tar.gz
uhd-32ececbf36508a374d471ea370897b1c17cf1294.tar.bz2
uhd-32ececbf36508a374d471ea370897b1c17cf1294.zip
log: Fix ANSI colour codes
The colour codes used for console logging were incorrectly defined. Some colours would simply not rendered this way (e.g., red), others had the boldness flag wrong.
Diffstat (limited to 'host/lib/utils/log.cpp')
-rw-r--r--host/lib/utils/log.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/host/lib/utils/log.cpp b/host/lib/utils/log.cpp
index 0d1ab0469..3cf23e540 100644
--- a/host/lib/utils/log.cpp
+++ b/host/lib/utils/log.cpp
@@ -25,13 +25,15 @@ namespace pt = boost::posix_time;
constexpr double READ_TIMEOUT = 0.5; // Waiting time to read from the queue
// Don't make these static const std::string -- we need their lifetime guaranteed!
-#define PURPLE "\033[35;1m" // purple
-#define BLUE "\033[34;1m" // blue
-#define GREEN "\033[32;1m" // green
-#define YELLOW "\033[33;1m" // yellow
-#define RED "\033[31;0m" // red
-#define BRED "\033[31;1m" // bright red
-#define RESET_COLORS "\033[39;0m" // reset colors
+#define PURPLE "\033[0;35m" // purple
+#define BLUE "\033[1;34m" // blue
+#define GREEN "\033[0;32m" // green
+#define YELLOW "\033[0;33m" // yellow
+#define BYELLOW "\033[1;33m" // yellow
+#define RED "\033[0;31m" // red
+#define BRED "\033[1;31m" // bright red
+#define RED_ON_YELLOW "\033[0;31;43m" // bright red
+#define RESET_COLORS "\033[0;39m" // reset colors
/***********************************************************************
* Helpers