clang format

This commit is contained in:
gabime 2023-07-28 17:38:54 +03:00
parent 2ecc00e9c6
commit 6cac90b89a
6 changed files with 4 additions and 10 deletions

View File

@ -46,7 +46,6 @@ void bench_threaded_logging(size_t threads, int iters)
auto basic_mt = spdlog::basic_logger_mt("basic_mt", "logs/basic_mt.log", true);
bench_mt(iters, std::move(basic_mt), threads);
spdlog::info("");
auto rotating_mt = spdlog::rotating_logger_mt("rotating_mt", "logs/rotating_mt.log", file_size, rotating_files);
bench_mt(iters, std::move(rotating_mt), threads);

View File

@ -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);

View File

@ -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);
}

View File

@ -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();

View File

@ -39,7 +39,7 @@ set(SPDLOG_UTESTS_SOURCES
test_dup_filter.cpp
test_fmt_helper.cpp
test_stdout_api.cpp
test_create_dir.cpp
test_create_dir.cpp
test_custom_callbacks.cpp
test_cfg.cpp
test_time_point.cpp

View File

@ -78,4 +78,3 @@ TEST_CASE("stderr_color_mt", "[stderr]")
l->critical("Test stderr_color_mt");
spdlog::drop_all();
}