From ab96aebccd94b47e074b0c0f1f68c739a0878d93 Mon Sep 17 00:00:00 2001 From: Jochen Topf Date: Fri, 8 Jan 2021 16:19:19 +0100 Subject: [PATCH] Do not print ANSI color sequences on Windows The Windows console doesn't support ANSI color sequences, so we don't print then. Messages will just be without color. --- src/logging.hpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/logging.hpp b/src/logging.hpp index cf3c6580b..3a7fd3127 100644 --- a/src/logging.hpp +++ b/src/logging.hpp @@ -80,7 +80,12 @@ class logger bool m_log_sql = false; bool m_log_sql_data = false; bool m_show_progress = true; + +#ifdef _WIN32 + bool m_use_color = false; +#else bool m_use_color = osmium::util::isatty(2); +#endif }; // class logger