class FenixLogSink(private val logsDebug: Boolean = true) : LogSink { private val androidLogSink = AndroidLogSink() override fun log( priority: Log.Priority, tag: String?, throwable: Throwable?, message: String?, ) { if (priority == Log.Priority.DEBUG && !logsDebug) { return } androidLogSink.log(priority, tag, throwable, message) } }
Fenix [LogSink] implementation that writes to Android's log, depending on settings.