Android App을 개발할때 대부분 Android Studio의 logcat윈도우에서 log 메세지를 확인합니다.
하지만 저처럼 터미널에서 작업하는걸 좋아하는 사람도 있지요 ^^
그 분들을 위한 Script를 소개해 드립니다.
바로 pidcat ( https://github.com/JakeWharton/pidcat ) 입니다.
PID Cat
출처 : https://github.com/JakeWharton/pidcat
설치는 Homebrew를 사용합니다. 터미널에서 다음 명령어로 설치 합니다.
$ brew install pidcat
실행 방법은 기존 logcat과 유사합니다.
터미널에서 다음 명령어로 실행합니다. (com.oprah.bees.android는 자신의 app package name 을 넣으시면 됩니다)
$ pidcat com.oprah.bees.android
$ pidcat -h
usage: pidcat [-h] [-w N] [-l {V,D,I,W,E,F,v,d,i,w,e,f}] [--color-gc]
[--always-display-tags] [--current] [-s DEVICE_SERIAL] [-d] [-e]
[-c] [-t TAG] [-i IGNORED_TAG] [-v]
[package [package ...]]
Filter logcat by package name
positional arguments:
package Application package name(s)
optional arguments:
-h, --help show this help message and exit
-w N, --tag-width N Width of log tag
-l {V,D,I,W,E,F,v,d,i,w,e,f}, --min-level {V,D,I,W,E,F,v,d,i,w,e,f}
Minimum level to be displayed
--color-gc Color garbage collection
--always-display-tags
Always display the tag name
--current Filter logcat by current running app
-s DEVICE_SERIAL, --serial DEVICE_SERIAL
Device serial number (adb -s option)
-d, --device Use first device for log input (adb -d option)
-e, --emulator Use first emulator for log input (adb -e option)
-c, --clear Clear the entire log before running
-t TAG, --tag TAG Filter output by specified tag(s)
-i IGNORED_TAG, --ignore-tag IGNORED_TAG
Filter output by ignoring specified tag(s)
-v, --version Print the version number and exit
이제 터미널에서도 이쁘게 디버깅 하시면 됩니다. ^^
'프로그래밍 > Android' 카테고리의 다른 글
Butter Knife (Field and method binding for android views) (0) | 2016.08.25 |
---|---|
Android HTTP dump log 보기 (apache http) (0) | 2016.08.25 |
Android JUnit - app의 resource에 접근하기 (0) | 2016.08.11 |
gson 소개 및 사용법 (0) | 2016.08.03 |
앱에서 알림표시 활성 여부 확인하는 방법 (2) | 2016.08.01 |