Skip to content

Commit

Permalink
Merge branch 'android.sink' into hunter
Browse files Browse the repository at this point in the history
  • Loading branch information
ruslo committed Sep 14, 2015
2 parents 340a71a + 8fdd4c3 commit 674dc9c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion include/spdlog/sinks/android_sink.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ class base_android_sink : public base_sink < Mutex >
protected:
void _sink_it(const details::log_msg& msg) override
{
if (msg.level == spdlog::level::off)
{
return;
}
const android_LogPriority priority = convert_to_android(msg.level);
const int expected_size = msg.formatted.size();
const int size = __android_log_write(
Expand Down Expand Up @@ -84,7 +88,6 @@ class base_android_sink : public base_sink < Mutex >
case spdlog::level::critical: return ANDROID_LOG_FATAL;
case spdlog::level::alert: return ANDROID_LOG_FATAL;
case spdlog::level::emerg: return ANDROID_LOG_FATAL;
case spdlog::level::off: throw spdlog_ex("Unexpected off");
default: throw spdlog_ex("Incorrect level value");
}
}
Expand Down

0 comments on commit 674dc9c

Please sign in to comment.