Take the 2-minute tour ×
Software Quality Assurance & Testing Stack Exchange is a question and answer site for software quality control experts, automation engineers, and software testers. It's 100% free, no registration required.

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).

share|improve this question
    
Is there a fixed number of special phrases or do you need to match them with a regular expression? –  user246 Feb 4 '13 at 14:18
    
Would this question have more chances of getting a helpful response on Stackoverflow? –  Suchit Parikh Feb 4 '13 at 18:51
    
@user246 need to match them with a regular expression, most common is error codes from server –  Pierre Feb 6 '13 at 8:28

3 Answers 3

up vote 1 down vote accepted

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 :)

share|improve this answer
    
After testing and trying to get things to work, this seems to fit my needs the most. Big and many thanks! –  Pierre Feb 7 '13 at 7:38

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.

share|improve this answer

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
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.