I want to get my log entries alone which i had put in the application and show it in the scrollable textview. For example
Log.e(SAMPLE_ACTIVITY_TAG, "App started")
I need those error logs alone and i dont want other unwanted logs. Is it possible by logcat command line tools ? I have tried the below code but i am getting complete application device logs
Process process = Runtime.getRuntime().exec("logcat -d");
BufferedReader bufferedReader = new BufferedReader(
new InputStreamReader(process.getInputStream()));
StringBuilder log=new StringBuilder();
String line = "";
while ((line = bufferedReader.readLine()) != null) {
log.append(line +"\n");
}
textView.setText(log.toString());
textView.setMovementMethod(new ScrollingMovementMethod());
Any suggestions