Skip to content

Commit d596a56

Browse files
authored
Honor --nojson for ostrace (#711)
1 parent 5154022 commit d596a56

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

main.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2795,7 +2795,11 @@ func runOsTrace(device ios.DeviceEntry, pid int, processName string, messageFilt
27952795
done <- err
27962796
return
27972797
}
2798-
fmt.Println(convertToJSONString(entry))
2798+
if JSONdisabled {
2799+
fmt.Printf("%s %s %d %s\n", entry.Timestamp.Format(time.RFC3339Nano), entry.LevelName, entry.PID, entry.Message)
2800+
} else {
2801+
fmt.Println(convertToJSONString(entry))
2802+
}
27992803
}
28002804
}()
28012805
c := make(chan os.Signal, 1)

0 commit comments

Comments
 (0)