1
0
mirror of https://github.com/owncloud/android-library.git synced 2025-06-06 15:36:45 +00:00

Logcat Android 11; optional live logging

This commit is contained in:
Hannes Achleitner 2021-03-12 07:10:01 +01:00
parent bf6f93ff1c
commit 30fa6e9a55
2 changed files with 3 additions and 1 deletions

View File

@ -6,7 +6,7 @@ dependencies {
api 'com.squareup.okhttp3:okhttp:4.6.0'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion"
api 'com.gitlab.ownclouders:dav4android:oc_support_2.1.5'
api 'com.github.AppDevNext.Logcat:LogcatCore:2.2.2'
api 'com.github.AppDevNext.Logcat:LogcatCore:2.8.0'
// Moshi
implementation("com.squareup.moshi:moshi-kotlin:$moshiVersion") {

View File

@ -1,5 +1,6 @@
package com.owncloud.android.lib.common.utils
import info.hannes.timber.DebugTree
import info.hannes.timber.FileLoggingTree
import info.hannes.timber.fileLoggingTree
import timber.log.Timber
@ -14,6 +15,7 @@ object LoggingHelper {
if (!directory.exists())
directory.mkdirs()
Timber.plant(FileLoggingTree(directory, filename = storagePath))
Timber.plant(DebugTree())
}
fun stopLogging() {