android - How to print a log from text file(saved in my phone) to cmd prompt -


when scenario gets failed in uiautomator, want print exception/failure logs in cmd prompt logcat log.how achieve this?

(below code prints current log)

bufferedreader bufferedreader = new bufferedreader(                    new inputstreamreader(runtime.getruntime().exec("logcat -e").getinputstream()));               string data;                           while((data = bufferedreader.readline()) != null)                  {                                                       system.out.println(data);               }               } 

the actual command used

logcat *:e

this print error logs of device on command prompt. please update code in way.

  bufferedreader bufferedreader = new bufferedreader(                     new inputstreamreader(runtime.getruntime().exec("logcat -d *:e")                             .getinputstream())); 

Comments

Popular posts from this blog

c# - How to get the current UAC mode -

postgresql - Lazarus + Postgres: incomplete startup packet -

javascript - Ajax jqXHR.status==0 fix error -