Bite Bits/Java, Android

안드로이드 logcat 파일로 저장하기

상영 2015. 10. 30. 11:01



To save LogCat to a text file open up a terminal window and type:
    adb logcat -d > logcat.txt

This will create a file named "logcat.txt" in your current directory.  The -d option indicates that you are dumping the current contents and then exiting.  If you do not use this option new lines of LogCat will be appended to the file, which may be useful.

Since LogCat can get pretty large very quickly you may want to clear it every once in a while, you can do this easily from Eclipse or from a terminal window using the command:
    adb logcat -c

Note that running adb logcat without any options will display the contents of LogCat in your terminal window.


더 자세한 내용은.. 


== 추가 ==

D:\Android\android-sdk\platform-tools>adb logcat  | findstr 9196 > logcat.txt

여기선 프로세스ID 9196 인 로그를 logcat.txt 에 저장하기,

9196 부분에 필터 역활을 할 텍스트를 넣으면 됨... 윈도 cmd 의 findstr 이 unix계열의 grep 역활이라고 보면 된다.