From c3b08ec554d5337e0539dd4466fcaa836fe3e263 Mon Sep 17 00:00:00 2001 From: Rick Foster <115846221+rick-bt@users.noreply.github.com> Date: Thu, 5 Sep 2024 14:26:54 -0700 Subject: [PATCH] Android doc custom logger (#2927) (#2928) * 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.