3 #include <android/log.h> 7 template<
class Formatter>
17 std::string str = Formatter::format(record);
19 __android_log_print(toPriority(record.
getSeverity()), m_tag,
"%s", str.c_str());
23 static android_LogPriority toPriority(
Severity severity)
28 return ANDROID_LOG_FATAL;
30 return ANDROID_LOG_ERROR;
32 return ANDROID_LOG_WARN;
34 return ANDROID_LOG_INFO;
36 return ANDROID_LOG_DEBUG;
38 return ANDROID_LOG_VERBOSE;
40 return ANDROID_LOG_UNKNOWN;
45 const char*
const m_tag;
Definition: AndroidAppender.h:5
Definition: Severity.h:11
AndroidAppender(const char *tag)
Definition: AndroidAppender.h:11
Definition: Severity.h:13
Definition: AndroidAppender.h:8
virtual void write(const Record &record)
Definition: AndroidAppender.h:15
Definition: Severity.h:12
virtual Severity getSeverity() const
Definition: Record.h:185
Definition: IAppender.h:6
Definition: Severity.h:10
Severity
Definition: Severity.h:5