This commit is contained in:
gabime
2016-05-15 01:45:37 +03:00
6 changed files with 12 additions and 12 deletions

View File

@@ -340,13 +340,13 @@ inline void spdlog::details::async_log_helper::sleep_or_yield(const spdlog::log_
using namespace std::this_thread;
using std::chrono::milliseconds;
using std::chrono::microseconds;
auto time_since_op = now - last_op_time;
// spin upto 50 micros
if (time_since_op <= microseconds(50))
return;
// yield upto 150 micros
if (time_since_op <= microseconds(100))
return yield();
@@ -356,7 +356,7 @@ inline void spdlog::details::async_log_helper::sleep_or_yield(const spdlog::log_
if (time_since_op <= milliseconds(200))
return sleep_for(milliseconds(20));
// sleep for 200 ms
// sleep for 200 ms
return sleep_for(milliseconds(200));
}

View File

@@ -49,7 +49,7 @@ inline spdlog::async_logger::async_logger(const std::string& logger_name,
async_logger(logger_name,
{
single_sink
}, queue_size, overflow_policy, worker_warmup_cb, flush_interval_ms, worker_teardown_cb) {}
}, queue_size, overflow_policy, worker_warmup_cb, flush_interval_ms, worker_teardown_cb) {}
inline void spdlog::async_logger::flush()

View File

@@ -619,7 +619,7 @@ inline void spdlog::pattern_formatter::format(details::log_msg& msg)
f->format(msg, tm_time);
}
//write eol
msg.formatted.write(details::os::eol, details::os::eol_size);
msg.formatted.write(details::os::eol, details::os::eol_size);
}
catch(const fmt::FormatError& e)
{

View File

@@ -65,6 +65,6 @@
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
// Uncomment to override default eol ("\n" or "\r\n" under Linux/Windows)
// Uncomment to override default eol ("\n" or "\r\n" under Linux/Windows)
// #define SPDLOG_EOL ";-)\n"
///////////////////////////////////////////////////////////////////////////////