deleted copy op and a little format

This commit is contained in:
Daniel Chabrowski 2018-02-25 02:43:26 +01:00
parent af50d5ef1f
commit 0c94ce0039
14 changed files with 35 additions and 33 deletions

View File

@ -78,5 +78,4 @@ private:
};
}
#include "details/async_logger_impl.h"

View File

@ -136,6 +136,9 @@ public:
// stop logging and join the back thread
~async_log_helper();
async_log_helper(const async_log_helper&) = delete;
async_log_helper& operator=(const async_log_helper&) = delete;
void set_formatter(formatter_ptr);
void flush(bool wait_for_q);
@ -155,7 +158,6 @@ private:
bool _terminate_requested;
// overflow policy
const async_overflow_policy _overflow_policy;

View File

@ -214,9 +214,9 @@ private:
bool _async_mode = false;
size_t _async_q_size = 0;
async_overflow_policy _overflow_policy = async_overflow_policy::block_retry;
std::function<void()> _worker_warmup_cb = nullptr;
std::chrono::milliseconds _flush_interval_ms{ 0 };
std::function<void()> _worker_teardown_cb = nullptr;
std::function<void()> _worker_warmup_cb;
std::chrono::milliseconds _flush_interval_ms;
std::function<void()> _worker_teardown_cb;
};
#ifdef SPDLOG_NO_REGISTRY_MUTEX

View File

@ -25,7 +25,7 @@ template<class Mutex>
class base_sink : public sink
{
public:
base_sink():_mutex() {}
base_sink() = default;
base_sink(const base_sink&) = delete;
base_sink& operator=(const base_sink&) = delete;

View File

@ -15,6 +15,7 @@ class sink
{
public:
virtual ~sink() = default;
virtual void log(const details::log_msg& msg) = 0;
virtual void flush() = 0;