How To Print The Logcat Log To Cmd Prompt
I'm running scenarios in UIAutomator.My output is displayed in CMD prompt. Whenever there is a failure i'm printing strings (displayed in Cmd prompt). When the scenarios fails, Is
Solution 1:
Late Answer, but better late than never ;-)
You can construct a BufferedReader that reads from logcat like this:
BufferedReaderbufferedReader=newBufferedReader(
newInputStreamReader(Runtime.getRuntime().exec("logcat -d").getInputStream()));
and then continue using BufferedReader
for getting the text content as usual and print for example to Cmd prompt as you wanted.
Not sure if that is the best practice doing it this way, but it works.
Post a Comment for "How To Print The Logcat Log To Cmd Prompt"