mirror of
https://github.com/gabime/spdlog.git
synced 2024-12-26 18:41:35 +08:00
minor renaming
This commit is contained in:
parent
2f7fdf2663
commit
3452892f76
@ -421,15 +421,15 @@ private:
|
|||||||
std::string _str;
|
std::string _str;
|
||||||
};
|
};
|
||||||
|
|
||||||
// set the color range. expect it to be in the form of "%^colored text%$"
|
// mark the color range. expect it to be in the form of "%^colored text%$"
|
||||||
class start_color_formatter SPDLOG_FINAL : public flag_formatter
|
class color_start_formatter SPDLOG_FINAL : public flag_formatter
|
||||||
{
|
{
|
||||||
void format(details::log_msg &msg, const std::tm &) override
|
void format(details::log_msg &msg, const std::tm &) override
|
||||||
{
|
{
|
||||||
msg.color_range_start = msg.formatted.size();
|
msg.color_range_start = msg.formatted.size();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
class stop_color_formatter SPDLOG_FINAL : public flag_formatter
|
class color_stop_formatter SPDLOG_FINAL : public flag_formatter
|
||||||
{
|
{
|
||||||
void format(details::log_msg &msg, const std::tm &) override
|
void format(details::log_msg &msg, const std::tm &) override
|
||||||
{
|
{
|
||||||
@ -438,7 +438,6 @@ class stop_color_formatter SPDLOG_FINAL : public flag_formatter
|
|||||||
};
|
};
|
||||||
|
|
||||||
// Full info formatter
|
// Full info formatter
|
||||||
|
|
||||||
// pattern: [%Y-%m-%d %H:%M:%S.%e] [%n] [%l] %v
|
// pattern: [%Y-%m-%d %H:%M:%S.%e] [%n] [%l] %v
|
||||||
class full_formatter SPDLOG_FINAL : public flag_formatter
|
class full_formatter SPDLOG_FINAL : public flag_formatter
|
||||||
{
|
{
|
||||||
@ -667,11 +666,13 @@ inline void spdlog::pattern_formatter::handle_flag(char flag)
|
|||||||
case ('i'):
|
case ('i'):
|
||||||
_formatters.emplace_back(new details::i_formatter());
|
_formatters.emplace_back(new details::i_formatter());
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ('^'):
|
case ('^'):
|
||||||
_formatters.emplace_back(new details::start_color_formatter());
|
_formatters.emplace_back(new details::color_start_formatter());
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ('$'):
|
case ('$'):
|
||||||
_formatters.emplace_back(new details::stop_color_formatter());
|
_formatters.emplace_back(new details::color_stop_formatter());
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default: // Unknown flag appears as is
|
default: // Unknown flag appears as is
|
||||||
|
Loading…
Reference in New Issue
Block a user