allow disabling color logging for tests

v1
Brett 2023-07-24 01:49:27 -04:00
parent 7fd3fbadb3
commit 20f8238f70
1 changed files with 9 additions and 1 deletions

View File

@ -10,7 +10,15 @@
#include <bitset> #include <bitset>
#include "hashmap_tests.h" #include "hashmap_tests.h"
int main() { int main(int argc, char** argv) {
if (argc > 1 && std::string(argv[1]) == "--no_color") {
for (int i = (int)blt::logging::log_level::NONE; i < (int)blt::logging::log_level::FATAL; i++) {
blt::logging::setLogColor((blt::logging::log_level)i, "");
}
blt::logging::setLogOutputFormat("[${{TIME}}] [${{LOG_LEVEL}}] (${{FILE}}:${{LINE}}) ${{STR}}\n");
}
binaryTreeTest(); binaryTreeTest();
run_logging(); run_logging();