This commit is contained in:
gabime
2016-09-15 00:38:21 +03:00
parent 6312748cc7
commit 5653e5c9d7
10 changed files with 3257 additions and 2535 deletions

View File

@@ -253,7 +253,7 @@ inline void spdlog::details::async_log_helper::push_msg(details::async_log_helpe
inline void spdlog::details::async_log_helper::flush(bool wait_for_q)
{
push_msg(async_msg(async_msg_type::flush));
if(wait_for_q)
if(wait_for_q)
wait_empty_q(); //return only make after the above flush message was processed
}
@@ -303,8 +303,10 @@ inline bool spdlog::details::async_log_helper::process_next_msg(log_clock::time_
log_msg incoming_log_msg;
incoming_async_msg.fill_log_msg(incoming_log_msg);
_formatter->format(incoming_log_msg);
for (auto &s : _sinks){
if(s->should_log( incoming_log_msg.level)){
for (auto &s : _sinks)
{
if(s->should_log( incoming_log_msg.level))
{
s->log(incoming_log_msg);
}
}

View File

@@ -245,8 +245,10 @@ inline bool spdlog::logger::should_log(spdlog::level::level_enum msg_level) cons
inline void spdlog::logger::_sink_it(details::log_msg& msg)
{
_formatter->format(msg);
for (auto &sink : _sinks){
if( sink->should_log( msg.level)){
for (auto &sink : _sinks)
{
if( sink->should_log( msg.level))
{
sink->log(msg);
}
}

View File

@@ -108,7 +108,7 @@ inline std::shared_ptr<spdlog::logger> spdlog::syslog_logger(const std::string&
#if defined(__ANDROID__)
inline std::shared_ptr<spdlog::logger> spdlog::android_logger(const std::string& logger_name, const std::string& tag)
{
return create<spdlog::sinks::android_sink>(logger_name, tag);
return create<spdlog::sinks::android_sink>(logger_name, tag);
}
#endif