mirror of
https://github.com/gabime/spdlog.git
synced 2025-09-30 02:19:35 +08:00
clang format
This commit is contained in:
@@ -141,7 +141,6 @@ SPDLOG_INLINE std::shared_ptr<logger> logger::clone(std::string logger_name)
|
||||
return cloned;
|
||||
}
|
||||
|
||||
|
||||
SPDLOG_INLINE void logger::sink_it_(const details::log_msg &msg)
|
||||
{
|
||||
for (auto &sink : sinks_)
|
||||
@@ -174,7 +173,6 @@ SPDLOG_INLINE void logger::flush_()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
SPDLOG_INLINE bool logger::should_flush_(const details::log_msg &msg)
|
||||
{
|
||||
auto flush_level = flush_level_.load(std::memory_order_relaxed);
|
||||
|
@@ -103,7 +103,7 @@ public:
|
||||
|
||||
void log(log_clock::time_point log_time, source_loc loc, level::level_enum lvl, string_view_t msg)
|
||||
{
|
||||
if(should_log(lvl))
|
||||
if (should_log(lvl))
|
||||
{
|
||||
sink_it_(details::log_msg(log_time, loc, name_, lvl, msg));
|
||||
}
|
||||
@@ -111,7 +111,7 @@ public:
|
||||
|
||||
void log(source_loc loc, level::level_enum lvl, string_view_t msg)
|
||||
{
|
||||
if(should_log(lvl))
|
||||
if (should_log(lvl))
|
||||
{
|
||||
sink_it_(details::log_msg(loc, name_, lvl, msg));
|
||||
}
|
||||
@@ -195,8 +195,7 @@ public:
|
||||
}
|
||||
|
||||
// return true logging is enabled for the given level.
|
||||
[[nodiscard]]
|
||||
bool should_log(level::level_enum msg_level) const
|
||||
[[nodiscard]] bool should_log(level::level_enum msg_level) const
|
||||
{
|
||||
return msg_level >= level_.load(std::memory_order_relaxed);
|
||||
}
|
||||
|
@@ -58,7 +58,6 @@ SPDLOG_API void set_formatter(std::unique_ptr<spdlog::formatter> formatter);
|
||||
// example: spdlog::set_pattern("%Y-%m-%d %H:%M:%S.%e %l : %v");
|
||||
SPDLOG_API void set_pattern(std::string pattern, pattern_time_type time_type = pattern_time_type::local);
|
||||
|
||||
|
||||
// Get global logging level
|
||||
SPDLOG_API level::level_enum get_level();
|
||||
|
||||
|
Reference in New Issue
Block a user