mirror of
https://github.com/gabime/spdlog.git
synced 2025-10-01 10:59:02 +08:00
clang-format
This commit is contained in:
@@ -12,8 +12,8 @@
|
||||
namespace spdlog {
|
||||
namespace details {
|
||||
|
||||
SPDLOG_INLINE log_msg::log_msg(
|
||||
spdlog::log_clock::time_point log_time, spdlog::source_loc loc, string_view_t a_logger_name, spdlog::level::level_enum lvl, spdlog::string_view_t msg)
|
||||
SPDLOG_INLINE log_msg::log_msg(spdlog::log_clock::time_point log_time, spdlog::source_loc loc, string_view_t a_logger_name,
|
||||
spdlog::level::level_enum lvl, spdlog::string_view_t msg)
|
||||
: logger_name(a_logger_name)
|
||||
, level(lvl)
|
||||
, time(log_time)
|
||||
|
@@ -95,7 +95,10 @@ struct null_scoped_padder
|
||||
null_scoped_padder(size_t /*wrapped_size*/, const padding_info & /*padinfo*/, memory_buf_t & /*dest*/) {}
|
||||
|
||||
template<typename T>
|
||||
static unsigned int count_digits(T /* number */) { return 0;}
|
||||
static unsigned int count_digits(T /* number */)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
};
|
||||
|
||||
template<typename ScopedPadder>
|
||||
@@ -653,7 +656,6 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
// Current pid
|
||||
template<typename ScopedPadder>
|
||||
class pid_formatter final : public flag_formatter
|
||||
@@ -766,7 +768,7 @@ public:
|
||||
}
|
||||
|
||||
size_t text_size;
|
||||
if(padinfo_.enabled())
|
||||
if (padinfo_.enabled())
|
||||
{
|
||||
// calc text size for padding based on "filename:line"
|
||||
text_size = std::char_traits<char>::length(msg.source.filename) + ScopedPadder::count_digits(msg.source.line) + 1;
|
||||
@@ -900,7 +902,6 @@ private:
|
||||
log_clock::time_point last_message_time_;
|
||||
};
|
||||
|
||||
|
||||
// Full info formatter
|
||||
// pattern: [%Y-%m-%d %H:%M:%S.%e] [%n] [%l] %v
|
||||
class full_formatter final : public flag_formatter
|
||||
|
Reference in New Issue
Block a user