ui: don't use low-level logger API

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
This commit is contained in:
Harsh Shandilya 2020-09-16 13:04:42 +05:30
parent 35fe5bd5f0
commit 4b36df504c
No known key found for this signature in database
GPG Key ID: 366D7BBAD1031E80
4 changed files with 7 additions and 7 deletions

View File

@ -103,7 +103,7 @@ class Application : android.app.Application(), OnSharedPreferenceChangeListener
backend = determineBackend()
futureBackend.complete(backend!!)
} catch (e: Throwable) {
Log.println(Log.ERROR, TAG, Log.getStackTraceString(e))
Log.e(TAG, Log.getStackTraceString(e))
}
}
sharedPreferences.registerOnSharedPreferenceChangeListener(this)

View File

@ -78,7 +78,7 @@ class ObservableTunnel internal constructor(
try {
manager.getTunnelConfig(this@ObservableTunnel)
} catch (e: Throwable) {
Log.println(Log.ERROR, TAG, Log.getStackTraceString(e))
Log.e(TAG, Log.getStackTraceString(e))
}
}
return field
@ -114,7 +114,7 @@ class ObservableTunnel internal constructor(
try {
manager.getTunnelStatistics(this@ObservableTunnel)
} catch (e: Throwable) {
Log.println(Log.ERROR, TAG, Log.getStackTraceString(e))
Log.e(TAG, Log.getStackTraceString(e))
}
}
return field

View File

@ -105,7 +105,7 @@ class TunnelManager(private val configStore: ConfigStore) : BaseObservable() {
try {
onTunnelsLoaded(withContext(Dispatchers.IO) { configStore.enumerate() }, withContext(Dispatchers.IO) { getBackend().runningTunnelNames })
} catch (e: Throwable) {
Log.println(Log.ERROR, TAG, Log.getStackTraceString(e))
Log.e(TAG, Log.getStackTraceString(e))
}
}
}
@ -128,7 +128,7 @@ class TunnelManager(private val configStore: ConfigStore) : BaseObservable() {
for (tunnel in tunnelMap)
tunnel.onStateChanged(if (running.contains(tunnel.name)) Tunnel.State.UP else Tunnel.State.DOWN)
} catch (e: Throwable) {
Log.println(Log.ERROR, TAG, Log.getStackTraceString(e))
Log.e(TAG, Log.getStackTraceString(e))
}
}
}
@ -144,7 +144,7 @@ class TunnelManager(private val configStore: ConfigStore) : BaseObservable() {
try {
tunnelMap.filter { previouslyRunning.contains(it.name) }.map { async(SupervisorJob()) { setTunnelState(it, Tunnel.State.UP) } }.awaitAll()
} catch (e: Throwable) {
Log.println(Log.ERROR, TAG, Log.getStackTraceString(e))
Log.e(TAG, Log.getStackTraceString(e))
}
}
}

View File

@ -59,7 +59,7 @@ class KernelModuleDisablerPreference(context: Context, attrs: AttributeSet?) : P
exitProcess(0)
}
} catch (e: Throwable) {
Log.println(Log.ERROR, TAG, Log.getStackTraceString(e))
Log.e(TAG, Log.getStackTraceString(e))
}
}
}