I have a wall hung tablet that I developed a for personal use application for. Since its wall hung, getting some logs out of my app is a bit of a pain.
I opted to go for running logcat -f
in my foreground service and saving the logs to the tablet where I can pull them at a later time.
I am executing it using a simple logcatSaver = Runtime.getRuntime().exec("logcat -f " + logFile);
.
What tends to happen is after a few minutes, the log stops saving. I added some logging points before / after the execution as well as generally in my foreground service and it doesn't look like its related to the foreground service it self. It goes up, stays up, like it should. I'll add that my application as well as the foreground related bits are all working just fine. So no hard crashes are involved.
I'm leaning towards thinking its logcat -f
aborting for some reason.
Any ideas as to why logcat -f
would fairly quickly out of nowhere abort saving to my destination?