Disable colors if terminal no attached and simplfy ansicolor_sink

This commit is contained in:
gabime
2017-05-21 01:36:03 +03:00
parent 1ab63ffdca
commit 98addad888
4 changed files with 335 additions and 354 deletions

View File

@@ -19,7 +19,10 @@ namespace details
struct log_msg
{
log_msg() = default;
log_msg(const std::string *loggers_name, level::level_enum lvl) : logger_name(loggers_name), level(lvl)
log_msg(const std::string *loggers_name, level::level_enum lvl) :
logger_name(loggers_name),
level(lvl),
msg_id(0)
{
#ifndef SPDLOG_NO_DATETIME
time = os::now();
@@ -42,7 +45,6 @@ struct log_msg
fmt::MemoryWriter raw;
fmt::MemoryWriter formatted;
size_t msg_id;
};
}
}