Print error and abort instead of throw if SPDLOG_NO_EXEPTIONS is defined

This commit is contained in:
gabime
2019-08-19 11:31:33 +03:00
parent b0a25f0183
commit 0335e3fcc0
17 changed files with 88 additions and 74 deletions

View File

@@ -31,20 +31,20 @@ enum class async_msg_type
// Movable only. should never be copied
struct async_msg
{
async_msg_type msg_type;
level::level_enum level;
async_msg_type msg_type;
level::level_enum level;
log_clock::time_point time;
size_t thread_id;
size_t thread_id;
fmt::basic_memory_buffer<char, 176> raw;
source_loc source;
async_logger_ptr worker_ptr;
async_msg()
:msg_type(async_msg_type::log),
level(level::info),
thread_id(0)
{}
async_msg()
: msg_type(async_msg_type::log)
, level(level::info)
, thread_id(0)
{}
~async_msg() = default;
// should only be moved in or out of the queue..
@@ -52,17 +52,18 @@ struct async_msg
// support for vs2013 move
#if defined(_MSC_VER) && _MSC_VER <= 1800
async_msg(async_msg &&other) : msg_type(other.msg_type),
level(other.level),
time(other.time),
thread_id(other.thread_id),
raw(move(other.raw)),
msg_id(other.msg_id),
source(other.source),
worker_ptr(std::move(other.worker_ptr))
async_msg(async_msg &&other)
: msg_type(other.msg_type)
, level(other.level)
, time(other.time)
, thread_id(other.thread_id)
, raw(move(other.raw))
, msg_id(other.msg_id)
, source(other.source)
, worker_ptr(std::move(other.worker_ptr))
{}
async_msg &operator=(async_msg &&other)
async_msg &operator=(async_msg &&other)
{
msg_type = other.msg_type;
level = other.level;