0

My android code contains Log.e. When getting logcat programmatically, those logs are not displayed. My code for logcat is

                String command = "logcat MyApp:V";
                Process process = Runtime.getRuntime().exec(command);

                BufferedReader reader = new BufferedReader(new InputStreamReader(process.getInputStream()));
                StringBuilder result = new StringBuilder();
                String currentLine;

                while ((currentLine = reader.readLine()) != null) {
                    result.append(currentLine);
                    result.append("\n");
                }
                Log.e(TAG, "printLog: " + result.toString());
Phantômaxx
  • 37,901
  • 21
  • 84
  • 115
Nandha Kumar
  • 131
  • 3
  • 13

1 Answers1

0

Dont use result.toString.. Instead use resultLog.e(TAG, "printLog: " + result);