mirror of
https://github.com/gabime/spdlog.git
synced 2025-04-01 02:42:41 +08:00
clang-format
This commit is contained in:
parent
c55336e78d
commit
c97c025adb
include/spdlog
tests
@ -83,4 +83,3 @@ SPDLOG_INLINE void spdlog::async_logger::backend_flush_()
|
|||||||
SPDLOG_LOGGER_CATCH()
|
SPDLOG_LOGGER_CATCH()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -49,7 +49,6 @@ public:
|
|||||||
async_logger(std::string logger_name, sink_ptr single_sink, std::weak_ptr<details::thread_pool> tp,
|
async_logger(std::string logger_name, sink_ptr single_sink, std::weak_ptr<details::thread_pool> tp,
|
||||||
async_overflow_policy overflow_policy = async_overflow_policy::block);
|
async_overflow_policy overflow_policy = async_overflow_policy::block);
|
||||||
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void sink_it_(const details::log_msg &msg) override;
|
void sink_it_(const details::log_msg &msg) override;
|
||||||
void flush_() override;
|
void flush_() override;
|
||||||
|
@ -22,11 +22,13 @@ class backtracer
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
explicit backtracer(size_t n_messages)
|
explicit backtracer(size_t n_messages)
|
||||||
: n_messages_{n_messages}, messages_{n_messages}
|
: n_messages_{n_messages}
|
||||||
|
, messages_{n_messages}
|
||||||
{}
|
{}
|
||||||
|
|
||||||
backtracer(const backtracer &other):
|
backtracer(const backtracer &other)
|
||||||
n_messages_{other.n_messages_}, messages_{other.messages_}
|
: n_messages_{other.n_messages_}
|
||||||
|
, messages_{other.messages_}
|
||||||
{}
|
{}
|
||||||
|
|
||||||
size_t n_messages() const
|
size_t n_messages() const
|
||||||
|
@ -356,7 +356,6 @@ public:
|
|||||||
// error handler
|
// error handler
|
||||||
void set_error_handler(err_handler);
|
void set_error_handler(err_handler);
|
||||||
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
std::string name_;
|
std::string name_;
|
||||||
std::vector<sink_ptr> sinks_;
|
std::vector<sink_ptr> sinks_;
|
||||||
|
@ -2,9 +2,6 @@
|
|||||||
#include "test_sink.h"
|
#include "test_sink.h"
|
||||||
#include "spdlog/async.h"
|
#include "spdlog/async.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
TEST_CASE("bactrace1", "[bactrace]")
|
TEST_CASE("bactrace1", "[bactrace]")
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -34,7 +31,6 @@ TEST_CASE("bactrace1", "[bactrace]")
|
|||||||
REQUIRE(test_sink->lines()[7] == "****************** Backtrace End ********************");
|
REQUIRE(test_sink->lines()[7] == "****************** Backtrace End ********************");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
TEST_CASE("bactrace-async", "[bactrace]")
|
TEST_CASE("bactrace-async", "[bactrace]")
|
||||||
{
|
{
|
||||||
using spdlog::sinks::test_sink_mt;
|
using spdlog::sinks::test_sink_mt;
|
||||||
@ -67,4 +63,3 @@ TEST_CASE("bactrace-async", "[bactrace]")
|
|||||||
REQUIRE(test_sink->lines()[6] == "debug message 99");
|
REQUIRE(test_sink->lines()[6] == "debug message 99");
|
||||||
REQUIRE(test_sink->lines()[7] == "****************** Backtrace End ********************");
|
REQUIRE(test_sink->lines()[7] == "****************** Backtrace End ********************");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -19,6 +19,7 @@ template<class Mutex>
|
|||||||
class test_sink : public base_sink<Mutex>
|
class test_sink : public base_sink<Mutex>
|
||||||
{
|
{
|
||||||
const size_t lines_to_save = 100;
|
const size_t lines_to_save = 100;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
size_t msg_counter()
|
size_t msg_counter()
|
||||||
{
|
{
|
||||||
@ -45,7 +46,6 @@ public:
|
|||||||
return lines_;
|
return lines_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void sink_it_(const details::log_msg &msg) override
|
void sink_it_(const details::log_msg &msg) override
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user