From fe732554529bd948e30aafce628a7cf9b83c33ba Mon Sep 17 00:00:00 2001 From: gabime Date: Mon, 23 Jul 2018 00:13:24 +0300 Subject: [PATCH] Fixed issue #759 --- include/spdlog/details/registry.h | 5 +++-- tests/test_sink.h | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/include/spdlog/details/registry.h b/include/spdlog/details/registry.h index 77f977f6..800b004c 100644 --- a/include/spdlog/details/registry.h +++ b/include/spdlog/details/registry.h @@ -169,7 +169,7 @@ public: } private: - registry_t() = default; + registry_t() : formatter_(new pattern_formatter("%+")){} ~registry_t() { @@ -196,7 +196,8 @@ private: Mutex loggers_mutex_; std::recursive_mutex tp_mutex_; std::unordered_map> loggers_; - std::unique_ptr formatter_{ new pattern_formatter("%+") }; + //std::unique_ptr formatter_{ new pattern_formatter("%+") }; + std::unique_ptr formatter_; level::level_enum level_ = level::info; level::level_enum flush_level_ = level::off; log_err_handler err_handler_; diff --git a/tests/test_sink.h b/tests/test_sink.h index c4a09f0d..101c15f1 100644 --- a/tests/test_sink.h +++ b/tests/test_sink.h @@ -47,7 +47,7 @@ protected: } size_t msg_counter_{0}; size_t flush_counter_{0}; - std::chrono::milliseconds delay_{0}; + std::chrono::milliseconds delay_{std::chrono::milliseconds::zero()}; }; using test_sink_mt = test_sink;