Redirect print statements to logcat

Create issue
Issue #40 resolved
Paul Bienkowski created an issue

It would be helpful if print() output could be redirected to somewhere the developer can read, e.g. the android log (adb logcat). Or maybe some debug-mode overlay that prints the console output onto the device screen.

Comments (8)

  1. Martin Felis repo owner

    Yes, that is a good point!

    In the mean time you can use SDL.log(somestring) to log things. I have added it for the port. It might be added once the output defaults to logcat, but you will read about it in the changelog.

  2. Karthik T

    Even more than stdout, we need stderr, what would be a error on a desktop is a silent crash on android or is there a way to enable this?

  3. Alex Szpakowski

    what would be a error on a desktop is a silent crash on android

    Lua errors should show up via the blue error handler screen just like they do on desktops (and pcall catches them too.) Does that not happen for you using the latest version of love-android?

  4. Karthik T

    nvm, tracked down my issue.. had table= {operation = operation, data = data} in my code :( Days like this i feel I am too stupid to do programming..

  5. Gustavo Alberto Lara Gómez

    Dumb question, do I have to root my device to be able to see the print() output with adb logcat ? I can see errors and other android stuff processes in the log but not the print calls, I've compiled the most recent version of the source

    EDIT: Nevermind, I run it with adb shell monkey, then run adb logcat and now I can see the prints :)

  6. Log in to comment