0

I google a lot and found only this approach:

String cmd = String.format("logcat -d '%s:I' '*:S'", Schema.TAG);
Process process = Runtime.getRuntime().exec(cmd);
BufferedReader reader = new BufferedReader( 
        new InputStreamReader(process.getInputStream()));
while((line = reader.readLine()) != null) {
    builder.append(line);
    builder.append(separator);
}

But it's not work well. I get an empty string or a small part of logs when execute this command.

Could you suggest how I can get the logs form device, like adb at PC.

peng.wang
  • 1
  • 1

1 Answers1

1

Try this

Log.d("===============>>>","Your String");

in your android monitor search for this "===============>>>"

that's it

Anil
  • 1,605
  • 1
  • 14
  • 24