Commit Graph
58 Commits
Author SHA1 Message Date
Louis Boval f8ee064e89 Properly match process kill/death/leave messages for secondary processes
Summary: The regexes for process exits were no matching secondary processes, which makes it understandably hard to track their
lifecycles. Fix it by including ':' in the process name match groups, as in the process start regex.

Test Plan: Run, match the chrome process name, com.android.chrome, see its secondary processes start reporting their death.
2014-03-27 18:03:12 -07:00
Jake Wharton 2e1b3c9198 Merge pull request #51 from LouisBVL/process_parse
Allow package to specify a process as well …
2014-03-27 17:35:33 -07:00
Louis Boval 1900517819 [pidcat] Allow package to specify a process as well …
Summary: Android apps can use multiple processes (eg, chrome), which are identified as <package_name>:<process_name> in logs. The names are defined in the manifest.
The main process is referred to as simply <package_name> by android.
Add the ability to specify a target process as part of what was until now the package name in pidcat, or all processes if no process is specified.

Usage:
 * pidcat <package_name> will match all of an app's processes (catchall).
 * pidcat <package_name>:<process_name> will match a given named process.
 ** In particular, pidcat <package_name>: will ensure only the app's main/default process is matched.

Test Plan: Run the script, try out with no process, empty (aka default) process, named process. Try multiple entries.
2014-03-12 23:35:47 -07:00
Louis Boval 97b9c28813 [pidcat] Display package:process_name in process birth/death messages
Summary: Making sense of a birth/death message is made easier by specifying which process it applies to, and not just the component or the pid.

Test Plan: Run, monitor message lines when cycling a multi-process app, inject None as a process name to check resilience.
2014-03-12 23:27:39 -07:00
Omar A Rodriguez bb8701b514 Print backtrace after a native crash 2014-02-14 00:31:41 -08:00
Jake Wharton eda219681a Tweak header. 2014-01-09 15:54:03 -08:00
Aaron Simmons 5217c75ec0 making pidcat robust to when the loglevel isn't one of VDIWEF (!?) 2014-01-03 15:11:09 -07:00
Jake Wharton 4eb4e68392 Revert "Merge pull request #32 from thorikawa/fix_samsung_logcat_issue"
This reverts commit 87ad7dc1d9, reversing
changes made to aa6e3f0f69.
2013-12-02 00:50:08 -08:00
Jake Wharton 87ad7dc1d9 Merge pull request #32 from thorikawa/fix_samsung_logcat_issue
Use ps command to detect PIDs
2013-10-21 10:15:41 -07:00
colriot 41d3d4ccfc Made package arg optional. 2013-10-12 16:04:20 +02:00
Thura Hlaing 6b6034ab67 fixed unicode print bug 2013-09-23 16:16:35 +06:30
Thura Hlaing bf51754642 added option to always display tag name, so that we can pipe its output and filter by tags 2013-09-12 10:17:00 +06:30
Poly Takahiro Horikawa 98ff1fbf90 Add unit to interval constant name 2013-08-21 17:32:46 -07:00
Poly Takahiro Horikawa 675bfcf889 Add thread task to check ps command regularly 2013-08-21 16:27:10 -07:00
Poly Takahiro Horikawa 18674c501c Added pid initializer using ps command 2013-08-21 15:02:07 -07:00
mike castleman f643e4c3b4 Replace tabs with four spaces.
It appears that java stack dumps contain the tab character. This causes
line length computation to be messed up, so (on at least some
terminals), the lines end up wrapping twice -- once when we hit the
right edge of the terminal, and then again a few characters later when
indent_wrap() inserts a newline. By using spaces, where pidcat and the
terminal can agree on the width of the character, we obviate this
problem.
2013-07-18 16:38:04 -04:00
Eric Butler 2ae38a1955 Ignore bad utf8 data. Fixes #22. 2013-07-15 11:27:20 -07:00
Dario Marcato 83dde7639a Fix trim changes 2013-07-12 15:03:40 +02:00
Dario Marcato c39bd56415 Better regex 2013-07-12 14:56:14 +02:00
Robert Jacob e7a02cbefb Added arguments for selecting device/emulator analogue to adb. 2013-07-07 17:50:47 +02:00
Robert Jacob 064a73d2dc Fix bug line matching. 2013-07-07 16:13:27 +02:00
Jake Wharton 9ca81d87df Remove craziness around native tag bug line regex. 2013-07-03 16:35:50 -07:00
Jake Wharton a99784eaa5 Add 'F' level to log levels. 2013-06-24 09:16:07 -07:00
Jake Wharton 571826e8c0 UTF-8 decode and trim each line.
Closes #18.
2013-06-19 14:18:52 -07:00
Jake Wharton 106a4ceacd Code style tweaks. 2013-06-19 11:05:43 -07:00
Lucio Maciel d1ca77b0e9 Add support for -s device_serial option
It will pass the '-s serial_number' option to adb to select
which device to monitor
2013-06-19 08:36:09 -03:00
Jake Wharton f624fe4b22 Merge pull request #12 from shawnma/master
Support logcat level filtering
2013-06-18 18:37:57 -07:00
Jake Wharton d6819b04ae Use subprocess for adb command. Do not fail if we can't get terminal size. 2013-06-18 18:32:11 -07:00
Jake Wharton e14490a6e7 Merge branch 'master' of https://github.com/JakeWharton/pidcat 2013-06-18 08:26:24 -07:00
Jake Wharton 78aba9d35e Python 3-compatibility. 2013-06-18 08:26:06 -07:00
Shawn Ma 4095d3aae7 text change: "Minimum level" 2013-06-15 11:00:47 -07:00
Tomasz Rozbicki 0253471785 fix typo 'match_pacakges' 2013-06-15 17:50:12 +02:00
Tomasz Rozbicki 97bc4d1352 support for the 'fatal' tag 2013-06-15 02:07:42 +02:00
Jake Wharton cf8138a1e9 Proc start needs a newline. 2013-06-13 20:54:27 -07:00
Shawn Ma d53f70917a support level filtering 2013-06-13 14:08:13 -07:00
Edison Wang 5f3aadf6be renamed the function to be more descriptive. 2013-06-13 14:48:32 -04:00
Edison Wang f48b9a9dde do not print the arg at begining. 2013-06-13 14:46:36 -04:00
Edison Wang cb4af8a117 multiple package and process support. 2013-06-13 14:45:37 -04:00
Jake Wharton bce5ad6529 Better GC message detection. 2013-06-12 22:26:58 -07:00
Edison Wang 3b8b9df4b8 Check the package OR the package with the process token. 2013-06-12 18:52:34 -04:00
Jake Wharton 27d30b66b1 Multiple package support.
Closes #7.
2013-06-12 14:53:14 -07:00
Jake Wharton decd14471b Automatically color StrictMode violations log messages.
If the user opts-in to GC coloring (with --color-gc flag) then color freed space and main thread block times.
2013-06-12 14:45:48 -07:00
Edison Wang 7daa41e12c do not need to print this here. 2013-06-12 16:23:10 -04:00
Edison Wang 4aa2cf2287 support multiple processes for the same package. 2013-06-12 16:20:38 -04:00
Prateek Srivastava 33f5e6744f Filter the buggy line 2013-06-12 13:36:11 -06:00
Jake Wharton ff8ec0cdab Be more polite. 2013-06-12 10:24:31 -07:00
Jake Wharton 999a9e3b88 De-dup is not an option... 2013-06-12 10:21:07 -07:00
Jake Wharton ecfef8c571 Add log tag de-deuplication. 2013-06-12 10:17:22 -07:00
Jake Wharton 7b434651e1 Kill cache vars. 2013-06-12 10:13:27 -07:00
Jake Wharton e7b2dd24b8 Reduce newline abuse. 2013-06-12 10:10:12 -07:00