Bugfender can collect logs automatically from logcat. For that, you just have to call:
We recommend this as a quick way to get started with Bugfender. However, if you’d like more control on the logs you send to Bugfender, you can remove that line.
Logcat logging has a few drawbacks:
- There are some system-generated logs that you might not necessarily want to capture. You can filter those messages if you want, by providing a callback.
- The system logging daemon might crash. This is a known issue with some Samsung phones when lots of logs are being written in a short amount of time.
- The system logging daemon might be disabled. This is a known issue with some old models of Huawei phones.
- The system might decide to kill the process that the SDK needs to collect the logs if low on memory. This is a known issue with some Wear models.
Sending logs directly to Bugfender
If you want, you send logs directly to Bugfender, regardless if you capture logs from logcat or not. To do that, call Bugfender as if it were the Android Logger class:
Bugfender.f("TAG", "Fatal log") Bugfender.e("TAG", "Error log") Bugfender.w("TAG", "Warning log") Bugfender.d("TAG", "Debug log") Bugfender.i("TAG", "Info log") Bugfender.t("TAG", "Trace log")
We also have support for these logging libraries:
If you would like to support another library see Bugfender.log() to create your own adapter.