summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorHarsh Shandilya <me@msfjarvis.dev>2020-09-16 13:04:42 +0530
committerHarsh Shandilya <me@msfjarvis.dev>2020-09-16 13:04:42 +0530
commit4b36df504c13dbd8cbcdc2f8a324d07a1e5b3837 (patch)
treeb26236d836ae22c2ecf7de4cde76087b3d6c042b
parent35fe5bd5f09aa03b540349c89eb711fa3ad2c572 (diff)
ui: don't use low-level logger API
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
-rw-r--r--ui/src/main/java/com/wireguard/android/Application.kt2
-rw-r--r--ui/src/main/java/com/wireguard/android/model/ObservableTunnel.kt4
-rw-r--r--ui/src/main/java/com/wireguard/android/model/TunnelManager.kt6
-rw-r--r--ui/src/main/java/com/wireguard/android/preference/KernelModuleDisablerPreference.kt2
4 files changed, 7 insertions, 7 deletions
diff --git a/ui/src/main/java/com/wireguard/android/Application.kt b/ui/src/main/java/com/wireguard/android/Application.kt
index 8b3be8de..f63e6270 100644
--- a/ui/src/main/java/com/wireguard/android/Application.kt
+++ b/ui/src/main/java/com/wireguard/android/Application.kt
@@ -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)
diff --git a/ui/src/main/java/com/wireguard/android/model/ObservableTunnel.kt b/ui/src/main/java/com/wireguard/android/model/ObservableTunnel.kt
index d9d09b87..963ae12b 100644
--- a/ui/src/main/java/com/wireguard/android/model/ObservableTunnel.kt
+++ b/ui/src/main/java/com/wireguard/android/model/ObservableTunnel.kt
@@ -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
diff --git a/ui/src/main/java/com/wireguard/android/model/TunnelManager.kt b/ui/src/main/java/com/wireguard/android/model/TunnelManager.kt
index b06585e4..1f9bc6c0 100644
--- a/ui/src/main/java/com/wireguard/android/model/TunnelManager.kt
+++ b/ui/src/main/java/com/wireguard/android/model/TunnelManager.kt
@@ -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))
}
}
}
diff --git a/ui/src/main/java/com/wireguard/android/preference/KernelModuleDisablerPreference.kt b/ui/src/main/java/com/wireguard/android/preference/KernelModuleDisablerPreference.kt
index 3ceb0806..04894b14 100644
--- a/ui/src/main/java/com/wireguard/android/preference/KernelModuleDisablerPreference.kt
+++ b/ui/src/main/java/com/wireguard/android/preference/KernelModuleDisablerPreference.kt
@@ -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))
}
}
}