mirror of
https://github.com/monero-project/monero.git
synced 2025-08-01 23:56:12 -04:00
heed NO_COLOR environment variable
This commit is contained in:
parent
9367b432f6
commit
bfd7c00ced
2 changed files with 18 additions and 0 deletions
5
external/easylogging++/easylogging++.cc
vendored
5
external/easylogging++/easylogging++.cc
vendored
|
@ -149,6 +149,11 @@ static el::Color colorFromLevel(el::Level level)
|
|||
|
||||
static void setConsoleColor(el::Color color, bool bright)
|
||||
{
|
||||
static const char *no_color_var = getenv("NO_COLOR");
|
||||
static const bool no_color = no_color_var && *no_color_var; // apparently, NO_COLOR=0 means no color too (as per no-color.org)
|
||||
if (no_color)
|
||||
return;
|
||||
|
||||
#if ELPP_OS_WINDOWS
|
||||
HANDLE h_stdout = GetStdHandle(STD_OUTPUT_HANDLE);
|
||||
switch (color)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue