+ add allocators

+ use proper allocators
pull/690/head
Bousk 8 years ago committed by GitHub
parent 81c13ecd57
commit 564031cd66
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -33,19 +33,19 @@ class async_logger SPDLOG_FINAL : public logger
{ {
public: public:
template<class It> template<class It>
async_logger(const std::string &logger_name, const It &begin, const It &end, size_t queue_size, async_logger(const string &logger_name, const It &begin, const It &end, size_t queue_size,
const async_overflow_policy overflow_policy = async_overflow_policy::block_retry, const async_overflow_policy overflow_policy = async_overflow_policy::block_retry,
const std::function<void()> &worker_warmup_cb = nullptr, const std::function<void()> &worker_warmup_cb = nullptr,
const std::chrono::milliseconds &flush_interval_ms = std::chrono::milliseconds::zero(), const std::chrono::milliseconds &flush_interval_ms = std::chrono::milliseconds::zero(),
const std::function<void()> &worker_teardown_cb = nullptr); const std::function<void()> &worker_teardown_cb = nullptr);
async_logger(const std::string &logger_name, sinks_init_list sinks, size_t queue_size, async_logger(const string &logger_name, sinks_init_list sinks, size_t queue_size,
const async_overflow_policy overflow_policy = async_overflow_policy::block_retry, const async_overflow_policy overflow_policy = async_overflow_policy::block_retry,
const std::function<void()> &worker_warmup_cb = nullptr, const std::function<void()> &worker_warmup_cb = nullptr,
const std::chrono::milliseconds &flush_interval_ms = std::chrono::milliseconds::zero(), const std::chrono::milliseconds &flush_interval_ms = std::chrono::milliseconds::zero(),
const std::function<void()> &worker_teardown_cb = nullptr); const std::function<void()> &worker_teardown_cb = nullptr);
async_logger(const std::string &logger_name, sink_ptr single_sink, size_t queue_size, async_logger(const string &logger_name, sink_ptr single_sink, size_t queue_size,
const async_overflow_policy overflow_policy = async_overflow_policy::block_retry, const async_overflow_policy overflow_policy = async_overflow_policy::block_retry,
const std::function<void()> &worker_warmup_cb = nullptr, const std::function<void()> &worker_warmup_cb = nullptr,
const std::chrono::milliseconds &flush_interval_ms = std::chrono::milliseconds::zero(), const std::chrono::milliseconds &flush_interval_ms = std::chrono::milliseconds::zero(),
@ -62,10 +62,10 @@ public:
protected: protected:
void _sink_it(details::log_msg &msg) override; void _sink_it(details::log_msg &msg) override;
void _set_formatter(spdlog::formatter_ptr msg_formatter) override; void _set_formatter(spdlog::formatter_ptr msg_formatter) override;
void _set_pattern(const std::string &pattern, pattern_time_type pattern_time) override; void _set_pattern(const string &pattern, pattern_time_type pattern_time) override;
private: private:
std::unique_ptr<details::async_log_helper> _async_log_helper; unique_ptr<details::async_log_helper> _async_log_helper;
}; };
} // namespace spdlog } // namespace spdlog

Loading…
Cancel
Save