4

When testing a mobile app (android in this case), I like to use the SDK to monitor the data traffic between app and server. This to easier detect defects and send the reports to the proper developer (system).

Currently I use Putty/Cygwin and use commando prompt: adb –s /deviceId\ logcat –s /special-phrace-to-filter-out-everything-else-butt–app-traffic\. This is all good and I can follow the data traffic between client and server.

Now to my problem: I would like the console to catch/recognize special phrases and give those phrases different color. Anyone know if there is a nice tool for this? (It doesn’t need to be Putty / CygWin).

dzieciou
  • 10,512
  • 9
  • 47
  • 100
Pierre
  • 323
  • 1
  • 11

3 Answers3

4

If you only need a single color, you can use grep like this:

egrep --color "a regular expression|"

You might try snaketail-net. It runs in its own window rather than in a console, but it claims to highlight regular expressions in large log files.

Alternatively, you may be able to write a shell script that meets your needs. In bash, you can use the tput command to generate escape sequences for changing colors. See this page for details. You may need to experiment to determine whether the same instructions work with cygwin's shell. You can use something like the sed command to edit strings that match regular expressions.

3

The Configurable highlighting feature of BareTail works for us.

Using it with adb needs some tweaking, for example redirecting the output to a file that BareTail will show:

adb shell cat /proc/kmsg > file_to_show.txt
dzieciou
  • 10,512
  • 9
  • 47
  • 100
Rsf
  • 7,079
  • 1
  • 23
  • 36
2

Take a look at http://www.vanheusden.com/multitail/

Should fit the bill for what you are looking for I haven't tried it on cygwin but I think there's a build for it

You can have multiple color scheme so when you call your script, just pass it the color scheme you want

It also support regex so you can easily highlight timestamps or ip address

As a bonus, it also does much more than color text :)

PatriceM
  • 21
  • 2
  • After testing and trying to get things to work, this seems to fit my needs the most. Big and many thanks! – Pierre Feb 07 '13 at 07:38