Commit Graph
78 Commits
Author SHA1 Message Date
David Wu 53306b82b3 explicitly run adb command in brief format 2015-06-06 11:14:02 +08:00
Jake Wharton 961ded1b1d Prepare version 2.0.0. 2015-05-25 17:52:07 -07:00
Jake Wharton a2604bb793 Change default tag length to 23. 2015-05-25 17:50:58 -07:00
takahiromandJake Wharton 215212683a add feature filter running app 2015-05-25 17:28:59 -07:00
Dario Marcato 95749e44a3 Allow tag filters with regex 2015-03-14 18:15:28 -07:00
Jake Wharton d85c10c25d Add support for Android 5.1. 2015-03-14 02:36:24 -04:00
Jake Wharton d23340de05 Merge pull request #88 from Pixplicity/master
Obtain unknown process IDs using `adb shell ps`
2015-02-17 17:56:36 -08:00
Anton Rieder c0620537c5 Add --version, remove trailing spaces in help texts 2015-02-17 14:11:25 +01:00
Paul Lammertsma e6fa71ef98 reintegrated pull request #71 (https://github.com/JakeWharton/pidcat/pull/71) onto master 2015-02-17 10:56:38 +01:00
laramaki fd999b79f7 Add ignore tag switch. Useful when inspecting the full log on over flooded log devices 2015-01-19 19:26:46 -02:00
Jake Wharton 4c79363e5a Support any number of spaces before the PID. 2014-10-07 14:10:01 -07:00
Adam Hupp 82c3305c7b Fix failure to match new format start messages
For low pids there's a space in front of the PID in the log message.
All my testing was on high pids :(
2014-10-06 17:18:08 -07:00
Adam Hupp 493e12a55c Handle alternative log format for process start
Some phones (like my samsung) do not log the 'Start proc ...' line in
logcat to indicate process start.  In my case it does log a line like

E/dalvikvm(pid): >>>>>> com.my.package [ more stuff ]

This commit adds support for that format to pidcat.
2014-10-01 10:20:35 -07:00
Adam Hupp 092ffc1869 Revert "Print line if we have not seen any pids created yet"
This reverts commit cd01ccf720.
2014-09-29 21:12:51 -07:00
Adam Stroud 3cfd3a839b Add support for tag(s) filtering 2014-08-19 14:02:23 -04:00
Brennan Taylor cd01ccf720 Print line if we have not seen any pids created yet
This specifically handles the case where you get a log snippet that may
not have any pid creation lines in it and pidcat ends up filtering
everything out. In this case we just print the line if we haven't seen
any pids yet.

An alternative would be allowing filter by pid, however I find grep
works fine for that.
2014-08-06 14:24:06 -07:00
Brennan Taylor 0827fafb44 When there is data on stdin we use it instead of adb 2014-07-15 13:32:36 -07:00
Brennan Taylor 1ed466123e Cleanup unused imports 2014-07-15 11:45:33 -07:00
Jaume Singla 78a1421215 min_level case unsensitive 2014-07-01 20:17:25 +02:00
wtud fee4b669cc Add -c to clear the log before starting logcat 2014-05-14 19:03:41 +02:00
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