Revert "chore: remove compile time debug log control"
This reverts commit 1ada466081
.
This commit is contained in:
parent
11b0a2e02a
commit
36d34073da
@ -16,7 +16,9 @@ namespace
|
|||||||
static const char COL_RESET[]{"\x1b[0m"};
|
static const char COL_RESET[]{"\x1b[0m"};
|
||||||
static const char RED[]{"\x1b[31m"};
|
static const char RED[]{"\x1b[31m"};
|
||||||
static const char YELLOW[]{"\x1b[33m"};
|
static const char YELLOW[]{"\x1b[33m"};
|
||||||
|
#ifndef NDEBUG
|
||||||
static const char MAGENTA[]{"\x1b[35m"};
|
static const char MAGENTA[]{"\x1b[35m"};
|
||||||
|
#endif
|
||||||
// static const char GREEN[] { "\x1b[32m"};
|
// static const char GREEN[] { "\x1b[32m"};
|
||||||
// static const char BLUE[] { "\x1b[34m"};
|
// static const char BLUE[] { "\x1b[34m"};
|
||||||
// static const char CYAN[] { "\x1b[36m"};
|
// static const char CYAN[] { "\x1b[36m"};
|
||||||
@ -78,7 +80,9 @@ Log::Log(LogLevel level_, std::ostream &ostream) : level(level_), stream(ostream
|
|||||||
stream << (is_terminal ? RED : "") << "[error] ";
|
stream << (is_terminal ? RED : "") << "[error] ";
|
||||||
break;
|
break;
|
||||||
case logDEBUG:
|
case logDEBUG:
|
||||||
|
#ifndef NDEBUG
|
||||||
stream << (is_terminal ? MAGENTA : "") << "[debug] ";
|
stream << (is_terminal ? MAGENTA : "") << "[debug] ";
|
||||||
|
#endif
|
||||||
break;
|
break;
|
||||||
default: // logINFO:
|
default: // logINFO:
|
||||||
stream << "[info] ";
|
stream << "[info] ";
|
||||||
@ -122,6 +126,9 @@ Log::~Log()
|
|||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
break;
|
break;
|
||||||
case logDEBUG:
|
case logDEBUG:
|
||||||
|
#ifdef NDEBUG
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
case logINFO:
|
case logINFO:
|
||||||
default:
|
default:
|
||||||
std::cout << buffer.str();
|
std::cout << buffer.str();
|
||||||
|
Loading…
Reference in New Issue
Block a user