This commit is contained in:
gabime 2016-11-18 16:58:30 +02:00
commit f6cece206a
4 changed files with 11 additions and 8 deletions

View File

@ -30,11 +30,11 @@
#endif
#if defined(__GNUC__) || defined(__clang__)
#define DEPRECATED __attribute__((deprecated))
#define SPDLOG_DEPRECATED __attribute__((deprecated))
#elif defined(_MSC_VER)
#define DEPRECATED __declspec(deprecated)
#define SPDLOG_DEPRECATED __declspec(deprecated)
#else
#define DEPRECATED
#define SPDLOG_DEPRECATED
#endif

View File

@ -82,7 +82,7 @@ async_msg(async_msg&& other) SPDLOG_NOEXCEPT:
// never copy or assign. should only be moved..
async_msg(const async_msg&) = delete;
async_msg& operator=(async_msg& other) = delete;
async_msg& operator=(const async_msg& other) = delete;
// construct from log_msg
async_msg(const details::log_msg& m) :
@ -359,7 +359,7 @@ inline void spdlog::details::async_log_helper::sleep_or_yield(const spdlog::log_
// yield upto 150 micros
if (time_since_op <= microseconds(100))
return yield();
return std::this_thread::yield();
// sleep for 20 ms upto 200 ms

View File

@ -343,8 +343,8 @@ inline std::string errno_str(int err_num)
else
return "Unkown error";
#elif defined(__FreeBSD__) || defined(__APPLE__) || defined(ANDROID) || \
((_POSIX_C_SOURCE >= 200112L) && ! defined(_GNU_SOURCE)) // posix version
#elif defined(__FreeBSD__) || defined(__APPLE__) || defined(ANDROID) || defined(__SUNPRO_CC) || \
((_POSIX_C_SOURCE >= 200112L) && ! _GNU_SOURCE) // posix version
if (strerror_r(err_num, buf, buf_size) == 0)
return std::string(buf);

View File

@ -15,7 +15,10 @@ namespace sinks
class sink
{
public:
sink(): _level( level::trace ) {}
sink()
{
_level = level::trace;
}
virtual ~sink() {}
virtual void log(const details::log_msg& msg) = 0;