mirror of
https://github.com/owncloud/android-library.git
synced 2025-06-07 16:06:08 +00:00
Logcat Android 11; optional live logging
This commit is contained in:
parent
24b850d20c
commit
aa42e31761
@ -6,7 +6,7 @@ dependencies {
|
|||||||
api 'com.squareup.okhttp3:okhttp:4.6.0'
|
api 'com.squareup.okhttp3:okhttp:4.6.0'
|
||||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion"
|
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion"
|
||||||
api 'com.gitlab.ownclouders:dav4android:oc_support_2.1.5'
|
api 'com.gitlab.ownclouders:dav4android:oc_support_2.1.5'
|
||||||
api 'com.github.AppDevNext.Logcat:LogcatCore:2.2.2'
|
api 'com.github.AppDevNext.Logcat:LogcatCoreLib:2.11.2'
|
||||||
|
|
||||||
// Moshi
|
// Moshi
|
||||||
implementation("com.squareup.moshi:moshi-kotlin:$moshiVersion") {
|
implementation("com.squareup.moshi:moshi-kotlin:$moshiVersion") {
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
|
|
||||||
package com.owncloud.android.lib.common.utils
|
package com.owncloud.android.lib.common.utils
|
||||||
|
|
||||||
|
import info.hannes.timber.DebugFormatTree
|
||||||
import info.hannes.timber.FileLoggingTree
|
import info.hannes.timber.FileLoggingTree
|
||||||
import info.hannes.timber.fileLoggingTree
|
import info.hannes.timber.fileLoggingTree
|
||||||
import timber.log.Timber
|
import timber.log.Timber
|
||||||
@ -38,6 +39,7 @@ object LoggingHelper {
|
|||||||
if (!directory.exists())
|
if (!directory.exists())
|
||||||
directory.mkdirs()
|
directory.mkdirs()
|
||||||
Timber.plant(FileLoggingTree(directory, filename = storagePath))
|
Timber.plant(FileLoggingTree(directory, filename = storagePath))
|
||||||
|
Timber.plant(DebugFormatTree())
|
||||||
}
|
}
|
||||||
|
|
||||||
fun stopLogging() {
|
fun stopLogging() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user