diff options
author | gabime <gmelman1@gmail.com> | 2018-07-23 00:13:24 +0300 |
---|---|---|
committer | gabime <gmelman1@gmail.com> | 2018-07-23 00:13:24 +0300 |
commit | fe732554529bd948e30aafce628a7cf9b83c33ba (patch) | |
tree | 34c4910f4e9c0d9760ed7b4974fa849367b58b59 | |
parent | 9d497d5afdfc48e40789750dd2270f37a4a508e7 (diff) |
Fixed issue #759
-rw-r--r-- | include/spdlog/details/registry.h | 5 | ||||
-rw-r--r-- | 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<Mutex>() = default; + registry_t<Mutex>() : formatter_(new pattern_formatter("%+")){} ~registry_t<Mutex>() { @@ -196,7 +196,8 @@ private: Mutex loggers_mutex_; std::recursive_mutex tp_mutex_; std::unordered_map<std::string, std::shared_ptr<logger>> loggers_; - std::unique_ptr<formatter> formatter_{ new pattern_formatter("%+") }; + //std::unique_ptr<formatter> formatter_{ new pattern_formatter("%+") }; + std::unique_ptr<formatter> 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<std::mutex>; |