From d4880735ff3bf1b70cfaa2e296df40c495185a53 Mon Sep 17 00:00:00 2001 From: Rick Foster <115846221+rick-bt@users.noreply.github.com> Date: Thu, 5 Sep 2024 14:14:17 -0700 Subject: [PATCH] Android doc custom logger (#2927) * Add information about replacing BacktraceLogger with custom implementation * Update configuration.md --------- Co-authored-by: Bartosz Litwiniuk Co-authored-by: Bartosz Litwiniuk --- .../platform-integrations/android/configuration.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/error-reporting/platform-integrations/android/configuration.md b/docs/error-reporting/platform-integrations/android/configuration.md index 1b8fb683e0..7774e5e125 100644 --- a/docs/error-reporting/platform-integrations/android/configuration.md +++ b/docs/error-reporting/platform-integrations/android/configuration.md @@ -383,6 +383,14 @@ To enable displaying logs from inside the library, set the level from which info BacktraceLogger.setLevel(LogLevel.DEBUG); ``` +You can replace internal BacktraceLogger with your custom implementation using code below. + +```java +BacktraceLogger.setLogger(customLoggerInstance); +``` + +Your custom logger implementation has to implement [Logger](https://github.com/backtrace-labs/backtrace-android/blob/master/backtrace-library/src/main/java/backtraceio/library/logger/Logger.java) interface. + ## Monitoring Custom Threads The backtrace-android library provides structures and methods to monitor the blocking of your own threads.