Update logger tags

This commit is contained in:
Ricki Hirner 2020-05-26 11:12:37 +02:00
parent 85beb90b2f
commit b59f6c8b7e
4 changed files with 9 additions and 8 deletions

View file

@ -8,7 +8,7 @@
package at.bitfire.davdroid.log
import android.annotation.SuppressLint
import android.app.Application
import android.app.PendingIntent
import android.content.Context
import android.content.Intent
@ -27,18 +27,17 @@ import java.io.IOException
import java.util.logging.FileHandler
import java.util.logging.Level
@SuppressLint("StaticFieldLeak") // we'll only keep an app context
object Logger : SharedPreferences.OnSharedPreferenceChangeListener {
private const val LOG_TO_FILE = "log_to_file"
val log: java.util.logging.Logger = java.util.logging.Logger.getLogger("davx5")
private lateinit var context: Context
private lateinit var context: Application
private lateinit var preferences: SharedPreferences
fun initialize(someContext: Context) {
context = someContext.applicationContext
fun initialize(appContext: Application) {
context = appContext
preferences = PreferenceManager.getDefaultSharedPreferences(context)
preferences.registerOnSharedPreferenceChangeListener(this)

View file

@ -44,7 +44,7 @@ class DavResourceFinder(
override fun toString() = wellKnownName
}
val log: Logger = Logger.getLogger("davdroid.DavResourceFinder")
val log: Logger = Logger.getLogger("davx5.DavResourceFinder")
private val logBuffer = StringHandler()
init {
log.level = Level.FINEST

View file

@ -1,4 +1,6 @@
#!/bin/sh
adb shell setprop log.tag.cert4android VERBOSE
adb shell setprop log.tag.davx5 VERBOSE
adb shell setprop log.tag.dav4jvm VERBOSE
adb shell setprop log.tag.davx5 VERBOSE
adb shell setprop log.tag.ical4android VERBOSE
adb shell setprop log.tag.vcard4android VERBOSE

@ -1 +1 @@
Subproject commit e83bc77a92275b3a646270120989186ecdfd2219
Subproject commit bc83109950c2760fd942651083af940a88805c4b