Closed Bug 805411 Opened 7 years ago Closed 7 years ago

Add more logcat options to mozdevice

Categories

(Testing :: Mozbase, defect)

x86_64
Linux
defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: wlach, Assigned: wlach)

References

Details

Attachments

(1 file, 1 obsolete file)

It would be nice to be able to specify the format, filterspecs, as well as a list of regular expressions for us to ignore. This would help with sifting through a large log, as for example in bug 805116.
Here's a patch that adds some more logcat options to mozdevice (as well as cleaning up the code in general). I added a "format" option (defaulting to time), made the filterspec configurable, and added an option to allow you to pass in a list of regular expressions to ignore.
Attachment #675098 - Flags: review?(gbrown)
Somehow accidentally attached the wrong patch. Fixed.

Here's a patch that adds some more logcat options to mozdevice (as well as cleaning up the code in general). I added a "format" option (defaulting to time), made the filterspec configurable, and added an option to allow you to pass in a list of regular expressions to ignore.
Attachment #675098 - Attachment is obsolete: true
Attachment #675098 - Flags: review?(gbrown)
Attachment #675099 - Flags: review?(gbrown)
Comment on attachment 675099 [details] [diff] [review]
Better logcat options for mozdevice (take 2)

Review of attachment 675099 [details] [diff] [review]:
-----------------------------------------------------------------

LGTM. Thanks!

::: mozdevice/mozdevice/devicemanager.py
@@ +501,3 @@
>          """
> +        cmdline = ["/system/bin/logcat", "-v", format, "-d"] + filterSpecs
> +        print cmdline

Consider removing the "print". There is some value to seeing what is being filtered out, but in most applications, with simple/constant filterSpecs, it will be one more thing for our eyes to ignore ("clutter").
Attachment #675099 - Flags: review?(gbrown) → review+
Pushed: https://github.com/mozilla/mozbase/commit/bbcd9b2b99cbeb64cfe2b228cbbe748d226badf9

I removed the print statement. I agree with :gbrown, that was just for debugging.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.