mirror of
https://github.com/gabime/spdlog.git
synced 2025-10-02 03:19:02 +08:00
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:
@@ -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
|
||||
|
Reference in New Issue
Block a user