ruboto/ruboto — pull request #479 by iqeo (2013-09-10 01:01:07+00:00)
Title: rake logcat

A rake task to filter logcat output to show only logs relevant to the application.

```
$ rake --describe logcat
rake logcat[filter]
Log activity execution, accepts optional logcat filter
```

* Watches for ActivityManager logging to detect application process ID.
* Filters for lines from the application process only.
* Includes relevant logs from Ruboto, DavlikVM, and any part of the Android system executing in the application's process.
* Prepends timestamp make log review easier.
* Accepts options logcat filters.

Example:

```
$ rake logcat
--- clearing logcat
--- starting logcat: adb logcat ActivityManager
--- waiting for activity net.iqeo.wifimap/.WifiMapActivity ...
20130909 205304.477000 I/ActivityManager( 527): START u0 {cmp=net.iqeo.wifimap/org.ruboto.RubotoActivity (has extras)} from pid 24965
20130909 205304.503000 I/System.out(24965): RubotoActivity onCreate(): org.ruboto.RubotoActivity
20130909 205304.504000 D/RUBOTO (24965): Looking for Ruby class: WifiMapMainActivity
20130909 205304.505000 D/RUBOTO (24965): Found: #>
20130909 205304.506000 D/RUBOTO (24965): Checking path: /storage/emulated/0/Android/data/net.iqeo.wifimap/files/scripts/wifi_map_main_activity.rb
20130909 205304.507000 D/RUBOTO (24965): Checking path: scripts/wifi_map_main_activity.rb
20130909 205304.508000 D/RUBOTO (24965): Classpath resource: jar:file:/data/app/net.iqeo.wifimap-2.apk!/wifi_map_main_activity.rb
20130909 205304.508000 D/RUBOTO (24965): Found script.
20130909 205304.509000 D/RUBOTO (24965): Checking path: /storage/emulated/0/Android/data/net.iqeo.wifimap/files/scripts/wifi_map_main_activity.rb
20130909 205304.510000 D/RUBOTO (24965): Checking path: scripts/wifi_map_main_activity.rb
20130909 205304.512000 D/RUBOTO (24965): Classpath resource: jar:file:/data/app/net.iqeo.wifimap-2.apk!/wifi_map_main_activity.rb
20130909 205304.528000 D/RUBOTO (24965): Script defines methods on meta class
20130909 205304.530000 D/RUBOTO (24965): Loading script: wifi_map_main_activity.rb
20130909 205304.530000 D/RUBOTO (24965): Script contains class definition
20130909 205304.531000 D/RUBOTO (24965): Set class: #>
20130909 205304.532000 D/RUBOTO (24965): Checking path: /storage/emulated/0/Android/data/net.iqeo.wifimap/files/scripts/wifi_map_main_activity.rb
20130909 205304.533000 D/RUBOTO (24965): Checking path: scripts/wifi_map_main_activity.rb
20130909 205304.537000 D/RUBOTO (24965): Classpath resource: jar:file:/data/app/net.iqeo.wifimap-2.apk!/wifi_map_main_activity.rb
20130909 205304.893000 D/RUBOTO (24965): Script load took 362ms
20130909 205304.898000 D/RUBOTO (24965): Call onCreate on: org.ruboto.RubotoActivity@43d50bb0
20130909 205304.903000 I/WifiMap (24965): WifiMapMainActivity: +on_create
20130909 205304.905000 I/System.out(24965): RubotoActivity onCreate(): org.ruboto.RubotoActivity
20130909 205304.907000 I/WifiMap (24965): Map: +init
20130909 205304.909000 I/WifiMap (24965): MapDbHelper: +initialize
20130909 205304.914000 I/WifiMap (24965): MapDbHelper: -initialize
20130909 205304.917000 I/WifiMap (24965): Map: -init
20130909 205304.922000 I/WifiMap (24965): WifiMapMainActivity: +create_view
```