# How to read monogame log files on android device

I am working on a monogame android project where I want to log some data. First try was something like this:

Log.Info(tag, message);


This works great when debugging in Visual Studio via the Android Device Logging-Window. But when I run the app on my mobile android device I have no idea how to view the log entries. As far as I know the logging happens in the so called CatLog, which can be viewed with some Apps. But unfortunately these apps need root access, which I think cannot be given to them on a "normal" android device.

Is there any way to either view the Logfile on my Android device or is there a better way of adding logging to my project?

I'm not familiar with monogame but LogCat can be viewed not only by using apps but also from command line tool adb(android debug bridge).

Assuming that you had to install android sdk You should be able to do this steps in your command line/shell:

1. Change dir to /YOUR_SDK_PATH/platform-tools eg. cd ~/android-sdk/platform-tools
2. Run adb with logcat option adb logcat for windows adb.exe logcat

The problematic outcome is that it prints whole LogCat output so you may want to filter it for your needs.