I am using following command which prints android device logs from connected device buffer in my desktop.
adb logcat
Now requirement is, i am running a test and want to see the output of current action in logs.
That is i need logs only since when i start logging command.
i don't want logs from the buffer or the logs prior to time when logging is started.
Also i don't want to clear the buffer using -c argument. because somebody (some other process) may need buffered traces during testing
adb logcat --live-trace
Thanks in advance for the help.
From logcat's help:
-d Dump the log and then exit (don't block).
-T <count> Print only the most recent <count> lines (does not imply -d).
This would print a line and keep printing:
adb logcat -T 1
(Tested on Android version 12, may not work on older Android versions)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With