Add mode enum to control output of color sinks

This adds a new "color_mode" enum that can be used to control the color
code output behavior of sinks with color support. It can be one of three
values: always, automatic and never.
This commit is contained in:
Philip Salzmann
2019-05-09 13:16:38 +02:00
parent 3669351427
commit 5e856c6b4d
4 changed files with 55 additions and 13 deletions

View File

@@ -159,6 +159,16 @@ inline spdlog::level::level_enum from_str(const std::string &name) SPDLOG_NOEXCE
using level_hasher = std::hash<int>;
} // namespace level
//
// Color mode used by sinks with color support.
//
enum class color_mode
{
always,
automatic,
never
};
//
// Pattern time - specific time getting to use for pattern_formatter.
// local time by default