Skip to content

Commit

Permalink
Do not print ANSI color sequences on Windows
Browse files Browse the repository at this point in the history
The Windows console doesn't support ANSI color sequences, so we don't
print then. Messages will just be without color.
  • Loading branch information
joto committed Jan 8, 2021
1 parent 0ece4cc commit ab96aeb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/logging.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit ab96aeb

Please sign in to comment.