Skip to content

Instantly share code, notes, and snippets.

@ckhung
Last active January 2, 2016 09:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ckhung/f096edaf4ebed5c0a8c7 to your computer and use it in GitHub Desktop.
Save ckhung/f096edaf4ebed5c0a8c7 to your computer and use it in GitHub Desktop.
filter adb logcat
#!/usr/bin/perl -w
# http://newtoypia.blogspot.tw/2015/08/cordova-debug.html
# 徒手除錯 Cordova
$kw = ($ARGV[0] or "console");
while (<STDIN>) {
if (m#console#i) {
print "\x1b[30;46m$_\x1b[m";
} elsif (m#$kw#i) {
print "\x1b[31m$_\x1b[m";
} elsif (not m#^[VDIW]/#) {
print;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment