34#include <android/log.h>
40claw::android_logger::android_logger(
const std::string& prefix)
47void claw::android_logger::write(
const std::string& str)
51 const std::string::size_type pos(m_output.find_last_of(
'\n'));
53 if(pos != std::string::npos)
55 std::string log_string(m_output.substr(0, pos));
56 m_output = m_output.substr(pos + 1);
58 __android_log_print(ANDROID_LOG_INFO, m_prefix.c_str(),
"%s",
66void claw::android_logger::flush()
71 __android_log_print(ANDROID_LOG_INFO, m_prefix.c_str(),
"%s",
Log messages using Android's log system.