[HOW-TO] C++ stream to android debug system

Hey, while porting Supertux for Android i needed to debug to the logcat, so i implemented a c++ stream which does just that.
You can use something like:

droidStream::output << “Hello world!”;

Here is the sample code!

One Comment

  1. Reply
    Arun January 6, 2012

    Thanks a lot! I was going crazy about how to do this. I had a system on windows with a ostream based logger and porting it to Android was a pain without any logs. You saved my day :)

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>