mirror of
https://github.com/gabime/spdlog.git
synced 2025-09-30 02:19:35 +08:00
astyle
This commit is contained in:
@@ -58,8 +58,8 @@ protected:
|
||||
const android_LogPriority priority = convert_to_android(msg.level);
|
||||
const int expected_size = msg.formatted.size();
|
||||
const int size = __android_log_write(
|
||||
priority, _tag.c_str(), msg.formatted.c_str()
|
||||
);
|
||||
priority, _tag.c_str(), msg.formatted.c_str()
|
||||
);
|
||||
if (size > expected_size)
|
||||
{
|
||||
// Will write a little bit more than original message
|
||||
@@ -75,16 +75,26 @@ private:
|
||||
{
|
||||
switch(level)
|
||||
{
|
||||
case spdlog::level::trace: return ANDROID_LOG_VERBOSE;
|
||||
case spdlog::level::debug: return ANDROID_LOG_DEBUG;
|
||||
case spdlog::level::info: return ANDROID_LOG_INFO;
|
||||
case spdlog::level::notice: return ANDROID_LOG_INFO;
|
||||
case spdlog::level::warn: return ANDROID_LOG_WARN;
|
||||
case spdlog::level::err: return ANDROID_LOG_ERROR;
|
||||
case spdlog::level::critical: return ANDROID_LOG_FATAL;
|
||||
case spdlog::level::alert: return ANDROID_LOG_FATAL;
|
||||
case spdlog::level::emerg: return ANDROID_LOG_FATAL;
|
||||
default: throw spdlog_ex("Incorrect level value");
|
||||
case spdlog::level::trace:
|
||||
return ANDROID_LOG_VERBOSE;
|
||||
case spdlog::level::debug:
|
||||
return ANDROID_LOG_DEBUG;
|
||||
case spdlog::level::info:
|
||||
return ANDROID_LOG_INFO;
|
||||
case spdlog::level::notice:
|
||||
return ANDROID_LOG_INFO;
|
||||
case spdlog::level::warn:
|
||||
return ANDROID_LOG_WARN;
|
||||
case spdlog::level::err:
|
||||
return ANDROID_LOG_ERROR;
|
||||
case spdlog::level::critical:
|
||||
return ANDROID_LOG_FATAL;
|
||||
case spdlog::level::alert:
|
||||
return ANDROID_LOG_FATAL;
|
||||
case spdlog::level::emerg:
|
||||
return ANDROID_LOG_FATAL;
|
||||
default:
|
||||
throw spdlog_ex("Incorrect level value");
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -69,7 +69,7 @@ public:
|
||||
{
|
||||
std::lock_guard<Mutex> lock(base_sink<Mutex>::_mutex);
|
||||
if (sink &&
|
||||
_sinks.end() == std::find(_sinks.begin(), _sinks.end(), sink))
|
||||
_sinks.end() == std::find(_sinks.begin(), _sinks.end(), sink))
|
||||
{
|
||||
_sinks.push_back(sink);
|
||||
}
|
||||
|
@@ -230,4 +230,4 @@ private:
|
||||
typedef daily_file_sink<std::mutex> daily_file_sink_mt;
|
||||
typedef daily_file_sink<details::null_mutex> daily_file_sink_st;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user