From 20f8238f70c9d59b71fa860bd7dbab9cf3316446 Mon Sep 17 00:00:00 2001 From: Brett Date: Mon, 24 Jul 2023 01:49:27 -0400 Subject: [PATCH] allow disabling color logging for tests --- src/tests/main.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/tests/main.cpp b/src/tests/main.cpp index 24509d5..507452b 100755 --- a/src/tests/main.cpp +++ b/src/tests/main.cpp @@ -10,7 +10,15 @@ #include #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(); run_logging();