33
33
34
34
import java .io .File ;
35
35
import java .io .IOException ;
36
+ import java .io .InputStream ;
36
37
import java .util .*;
37
38
import java .util .regex .Matcher ;
38
39
import java .util .regex .Pattern ;
@@ -256,6 +257,7 @@ public boolean isEmulator() {
256
257
257
258
public void setPackageName (String pkgName ) {
258
259
packageName = pkgName ;
260
+ System .out .println ("setting package name to " + packageName );
259
261
}
260
262
261
263
// I/Process ( 9213): Sending signal. PID: 9213 SIG: 9
@@ -267,12 +269,10 @@ public void setPackageName(String pkgName) {
267
269
private class LogLineProcessor implements LineProcessor {
268
270
public void processLine (final String line ) {
269
271
final LogEntry entry = new LogEntry (line );
270
- // System.err .println("***************************************************");
272
+ // System.out .println("***************************************************");
271
273
// System.out.println(line);
272
- // System.err.println(activeProcesses);
273
- // System.err.println(entry.message);
274
-
275
- System .out .println (line );
274
+ // System.out.println(activeProcesses);
275
+ // System.out.println(entry.message);
276
276
277
277
if (entry .message .startsWith ("PROCESSING" )) {
278
278
// Old start/stop process detection, does not seem to work anymore.
@@ -391,7 +391,7 @@ private void reportStackTrace(final LogEntry entry) {
391
391
392
392
void initialize () throws IOException , InterruptedException {
393
393
adb ("logcat" , "-c" );
394
- final String [] cmd = generateAdbCommand ("logcat" );
394
+ final String [] cmd = generateAdbCommand ("logcat" , "-v" , "brief" );
395
395
final String title = PApplet .join (cmd , ' ' );
396
396
logcat = Runtime .getRuntime ().exec (cmd );
397
397
ProcessRegistry .watch (logcat );
@@ -403,9 +403,6 @@ void initialize() throws IOException, InterruptedException {
403
403
public void run () {
404
404
try {
405
405
logcat .waitFor ();
406
- // final int result = logcat.waitFor();
407
- // System.err.println("AndroidDevice: " + getId() + " logcat exited "
408
- // + (result == 0 ? "normally" : "with status " + result));
409
406
} catch (final InterruptedException e ) {
410
407
System .err
411
408
.println ("AndroidDevice: logcat process monitor interrupted" );
0 commit comments