adb logcat

|
anr 로그 위치 : /data/anr/traces.txt

전체 로그 출력

adb logcat 


로그발생 시간을 포함하여 로그 출력

adb logcat -v time


우선순위에 따라 로그 필터링

명령어

 - adb logcat [ <filter-spec> ]

Filter 우선 순위

 - Verbose < Debug < Info < Warning < Error < Fatal < Silent

 - Filter는 각 우선순위의 첫 대문자로 설정한다.

 - Filter 이상의 우선순위를 갖는 로그를 출력한다.

사용 예

 - adb logcat *:I ==> Info 이상의 우선순위를 갖는 로그(Info, Warning, Error, Fatal, Silent)를 출력한다.

 - adb logcat mytag:I *:S ==> Info 중 "mytag"문자열을 갖는 로그만 출력한다. 우선순위가 높아도 다른 로그는 출력하지 않는다.


팁: 우선순위에 관계없이 특정 문자열을 포함하는 로그를 알고 싶으면?

 - adb logcat | grep mystring ==> "mystring"문자열을 갖는 로그만 출력한다.



To watch the log of an active device continually: adb logcat
To dump the whole log: adb logcat -d
To dump the whole log to a file: adb logcat -d > log.txt
To filter and display a particular log tag: adb logcat -s MyLogTag
 

adb logcat -d > log.txt

adb shell cat proc/kmsg > logkmsg.txt



'Android 개발 > 팁 / 활용정보' 카테고리의 다른 글

Init Logo, Boot Animation 변경  (0) 2011.08.09
adb shell 명령어  (0) 2011.08.05
google map api  (0) 2011.05.18
넥서스원 2.2.1 용 기본 어플 몇개  (1) 2011.04.19
루팅후 할일..  (0) 2011.04.13
And