1 #include "ace/config-all.h"
5 #include <android/log.h> // Android Logging Functions
8 #include "ace/Log_Category.h"
9 #include "ace/Log_Msg_Android_Logcat.h"
10 #include "ace/Log_Record.h"
11 #include "ace/OS_NS_string.h"
13 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
16 * Convert ACE Log Priority to Android Logcat Priority
18 static android_LogPriority
19 convert_log_priority (ACE_Log_Priority lm_priority
)
21 switch (lm_priority
) {
24 return ANDROID_LOG_DEBUG
;
29 return ANDROID_LOG_INFO
;
31 return ANDROID_LOG_WARN
;
35 return ANDROID_LOG_FATAL
;
38 return ANDROID_LOG_ERROR
;
42 ACE_Log_Msg_Android_Logcat::~ACE_Log_Msg_Android_Logcat ()
48 ACE_Log_Msg_Android_Logcat::open (const ACE_TCHAR
*)
54 ACE_Log_Msg_Android_Logcat::reset ()
60 ACE_Log_Msg_Android_Logcat::close ()
66 ACE_Log_Msg_Android_Logcat::log (ACE_Log_Record
&log_record
)
69 convert_log_priority (static_cast<ACE_Log_Priority
> (log_record
.type ())),
71 log_record
.msg_data ());
75 ACE_END_VERSIONED_NAMESPACE_DECL