From 33f881ac8b860a2cdb3c2d3e776795fdebbce889 Mon Sep 17 00:00:00 2001 From: gabime Date: Fri, 23 Aug 2019 02:45:41 +0300 Subject: [PATCH] clang-format --- include/spdlog/details/registry-inl.h | 4 +--- include/spdlog/logger-inl.h | 1 - include/spdlog/sinks/backtrace-sink.h | 20 +------------------- 3 files changed, 2 insertions(+), 23 deletions(-) diff --git a/include/spdlog/details/registry-inl.h b/include/spdlog/details/registry-inl.h index 26191a12..d6dbb451 100644 --- a/include/spdlog/details/registry-inl.h +++ b/include/spdlog/details/registry-inl.h @@ -67,7 +67,7 @@ SPDLOG_INLINE void registry::initialize_logger(std::shared_ptr new_logge new_logger->set_level(level_); new_logger->flush_on(flush_level_); - if(backtrace_level_ != level::off) + if (backtrace_level_ != level::off) { new_logger->enable_backtrace(backtrace_level_, backtrace_n_messages_); } @@ -76,8 +76,6 @@ SPDLOG_INLINE void registry::initialize_logger(std::shared_ptr new_logge { register_logger_(std::move(new_logger)); } - - } SPDLOG_INLINE std::shared_ptr registry::get(const std::string &logger_name) diff --git a/include/spdlog/logger-inl.h b/include/spdlog/logger-inl.h index 5f2174b6..d86cba77 100644 --- a/include/spdlog/logger-inl.h +++ b/include/spdlog/logger-inl.h @@ -128,7 +128,6 @@ SPDLOG_INLINE void logger::enable_backtrace(level::level_enum trigger_level, siz this->set_level(spdlog::level::trace); } - // flush functions SPDLOG_INLINE void logger::flush() { diff --git a/include/spdlog/sinks/backtrace-sink.h b/include/spdlog/sinks/backtrace-sink.h index f37d7f98..897a7c8b 100644 --- a/include/spdlog/sinks/backtrace-sink.h +++ b/include/spdlog/sinks/backtrace-sink.h @@ -5,7 +5,6 @@ #include "dist_sink.h" #include "spdlog/details/null_mutex.h" -#include "spdlog/details/log_msg.h" #include "spdlog/details/log_msg_buffer.h" #include "spdlog/details/circular_q.h" @@ -14,26 +13,9 @@ #include // Store log messages in circular buffer -// If it encounters a message with high enough level, it will send all pervious message to its child sinks +// If it encounters a message with high enough level, it will send all previous message to it child sinks // Useful for storing debug data in case of error/warning happens -// -// Example: -// -// #include "spdlog/spdlog.h" -// #include "spdlog/sinks/backtrace_sink.h -// -// int main() { -// auto backtrace_sink = std::make_shared(); -// backtrace_sink ->add_sink(std::make_shared()); -// spdlog::logger l("logger", backtrace_sink); -// logger.set_level(spdlog::level::trace); -// l.trace("Hello"); -// l.debug("Hello"); -// l.info("Hello"); -// l.warn("This will trigger the log of all prev messages in the queue"); -// } - namespace spdlog { namespace sinks { template