그냥 단말기만 연결해도 실시간으로 무의미한 워닝 및 에러 로그가 Logcat에 출력이 되고 있습니다.
08-13 11:44:54.850: W/System.err(2412): at android.bluetooth.BluetoothSocket.throwErrnoNative(Native Method)
08-13 11:44:54.850: W/System.err(2412): at android.bluetooth.BluetoothAdapter.createNewRfcommSocketAndRecord(BluetoothAdapter.java:1075)
08-13 11:44:54.850: W/System.err(2412): at android.bluetooth.BluetoothAdapter.listenUsingRfcommWithServiceRecord(BluetoothAdapter.java:1011)
08-13 11:44:54.850: W/System.err(2412): at com.mobileleader.sync.obex.connection.BluetoothConnection$AcceptThread.run(BluetoothConnection.java:136)
08-13 11:44:54.860: E/BLZ20_WRAPPER(2412): ##### ERROR : __listen_prot_rfcomm: failed with reason 12#####
08-13 11:44:54.870: E/BLZ20_WRAPPER(2412): ##### ERROR : __listen_prot_rfcomm: failed with reason 12#####
08-13 11:44:54.880: E/BLZ20_WRAPPER(2412): ##### ERROR : __listen_prot_rfcomm: failed with reason 1#####
08-13 11:44:55.881: W/System.err(2412): java.io.IOException: Bad file number
08-13 11:44:55.881: W/System.err(2412): at android.bluetooth.BluetoothSocket.throwErrnoNative(Native Method)
08-13 11:44:55.881: W/System.err(2412): at android.bluetooth.BluetoothAdapter.createNewRfcommSocketAndRecord(BluetoothAdapter.java:1075)
08-13 11:44:55.881: W/System.err(2412): at android.bluetooth.BluetoothAdapter.listenUsingRfcommWithServiceRecord(BluetoothAdapter.java:1011)
08-13 11:44:55.881: W/System.err(2412): at com.mobileleader.sync.obex.connection.BluetoothConnection$AcceptThread.run(BluetoothConnection.java:136)
08-13 11:44:55.891: E/BLZ20_WRAPPER(2412): ##### ERROR : __listen_prot_rfcomm: failed with reason 12#####
08-13 11:44:55.901: E/BLZ20_WRAPPER(2412): ##### ERROR : __listen_prot_rfcomm: failed with reason 12#####
08-13 11:44:55.911: E/BLZ20_WRAPPER(2412): ##### ERROR : __listen_prot_rfcomm: failed with reason 12#####
08-13 11:44:55.911: E/BLZ20_WRAPPER(2412): ##### ERROR : __listen_prot_rfcomm: failed with reason 1#####
이 상태에서 개발용 앱을 띄운 다음에 보고 싶은 로그를 Log.i(...)로 찍습니다.
그럼 붉은 색의 로그에 섞여서 스크롤 되겠죠... 이걸 또 Copy 해서 검색해서 찾아야 합니다.
매번 이런식으로 디버깅해야 하니 대체 누가 이따위의 디버깅툴을 만들었는지...
보고 싶은건 i 로그인데 e나 w 로그가 우선순위라서 같이 나오게 되어 있습니다.
정말 비생산적인 방식이라고 생각되는데 혹시 i 로그만 따로 볼수 있는 방법이 없을까요? 아니면 e, w 로그 안나오게 하는 방법이라도...
tag에 앱 로그를 구분 지을 수 있는 명으로 하시고 필터에 그 명을 넣으시면 앱 로그만 보실때 편하시구요. 로그 검색 input 칸 옆에 보면, Log 종료 별로 볼수 있도록 select 박스로 되어있습니다. Log.i로 출력한 로그만 보시려면 select 박스를 info로 선택해두시면 됩니다. 물론 e나 w 로그도 따로 볼수 있구요.
그리고 에러메세지 뜨면 거기서 자세히 보시면 에러나는 위치를 가리키는 부분이 있습니다. 거기 더블클릭하시면 해당 소스 위치로 갑니다.(없는 경우도 있음)
프루군//
답변 감사합니다.
알려주신 deprecated를 사용해도 마찬가지입니다. 불필요한 e, w 로그가 섞여서 올라옵니다.
저처럼 불필요한 e,w 로그가 수도없이 올라오는 단말기를 접속해서 사용해보시면 Logcat에 대한 생각이 아마 생각이 달라지실 겁니다.ㅋ
그냥 console에다가 찍는 방법도 찾고 있는데 구글링해도 안나오더군요... ㅠㅠ
다른 방법이 없을까요?
text필터링을 사용해서 보면 그래도 볼만하던데요
Log.i("abcd", "log = 보고싶은 로그");
위와 같은 로그를 보고싶다면
필터링에 tag:abcd 혹은 log =
를 적으면 해당 로그만 필터링이 됩니다.
전 그래서 로그 찍을때 필터링용 값을 제일 앞에 넣습니다.
필터세팅하고 타입 선택하면 원하시는 것만 나오실텐데요???
저도 개발하면서 불필요한 로그가 많이 올라오는 기기를 써봤지만
필터와 타입선택으로도 불편함은 없던거 같은데;;;
필터기능을 사용하시면 더 편하실겁니다.
해당 앱에서 일어나는 로그만 볼수도 있고, 거기서 다시 Text 필터도 가능해서
그렇게 최악이라고 생각안합니다.
i만 보실려면 로그캣 나오는 화면에 로그 타입선택하는 버튼있습니다.