본문 바로가기
IT 이야기/Android

logcat log 삭제 명령어

by KaySeo 2021. 1. 21.
반응형

Android App이나 System을 디버깅할 때 가장 많이 보는 것은 아마도 logcat 로그 일 것입니다.

그런데 간혹 출력된  log message가 너무 많은 경우가 있는데요.

 

이때 사용하는 adb 명령어는 아래와 같으며, 해당 명령어를 입력하면 전체 로그를 지우고 종료하게 됩니다. 기본 로그는 main, system, crash 입니다.

 

 

그런데 테스트 중에 위에 기술한 adb 명령어를 아무리 입력해도 log message가 삭제되지 않는 경우가 있습니다.
이럴 때는 아래와 같이 "-b all" 옵션을 추가하면 삭제가 되더군요.

참고하시기 바랍니다.

 

 


※ 참고사이트

stackoverflow.com/questions/2657348/how-can-i-erase-the-old-data-from-logcat/42938756

 

How can I erase the old data from logcat?

When I execute the command adb logcat while running the android emulator, all of the old logs blow past and so I figure they are stored in a file somewhere. Is there a command I can run to clea...

stackoverflow.com

developer.android.com/studio/command-line/logcat

 

Logcat 명령줄 도구  |  Android 개발자  |  Android Developers

Logcat은 기기에서 오류와 메시지(앱에서 Log 클래스로 작성)가 표시될 때 스택 추적을 비롯하여 시스템 메시지의 로그를 덤프하는 명령줄 도구입니다.

developer.android.com

 

반응형