Stream buffer that sends the data to Android log.
Usable in conjunction with std::
logcat utility. The data are sent on each
flush() call and then the internal buffer is cleared. Example usage:
AndroidLogStreamBuffer buffer(AndroidLogStreamBuffer::LogPriority::Info, "native-app"); std::ostream out(&buffer); out << "Hello World!" << std::endl;
The output stream can be also used with Debug classes.
auto sync() override -> int
- Send current data to the log buffer.
Utility:: AndroidLogStreamBuffer:: sync() override protected
Send current data to the log buffer.
After sending the message the internal data buffer is cleared to avoid sending the same data repeatedly.