summaryrefslogtreecommitdiff
path: root/Source/Android/app/src/main/java
diff options
context:
space:
mode:
authorJMC47 <JMC4789@gmail.com>2025-12-22 13:32:08 -0500
committerGitHub <noreply@github.com>2025-12-22 13:32:08 -0500
commit289814d0a8c475f6c8d95a445d549cfa826c8b38 (patch)
treed02bedc9af496943c5ef57b1228673e07a017d4c /Source/Android/app/src/main/java
parentddb35428ce14488a6c29f4b7426cc4d0fc194ebe (diff)
parent9f6400332f520851826943dc218373c2b566ac73 (diff)
Merge pull request #14144 from Simonx22/android/log-kotlin
Android: Convert Log to Kotlin
Diffstat (limited to 'Source/Android/app/src/main/java')
-rw-r--r--Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/utils/Log.java55
-rw-r--r--Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/utils/Log.kt49
2 files changed, 49 insertions, 55 deletions
diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/utils/Log.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/utils/Log.java
deleted file mode 100644
index 2f69527872..0000000000
--- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/utils/Log.java
+++ /dev/null
@@ -1,55 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0-or-later
-
-package org.dolphinemu.dolphinemu.utils;
-
-import org.dolphinemu.dolphinemu.BuildConfig;
-
-/**
- * Contains methods that call through to {@link android.util.Log}, but
- * with the same TAG automatically provided. Also no-ops VERBOSE and DEBUG log
- * levels in release builds.
- */
-public final class Log
-{
- private static final String TAG = "Dolphin";
-
- private Log()
- {
- }
-
- public static void verbose(String message)
- {
- if (BuildConfig.DEBUG)
- {
- android.util.Log.v(TAG, message);
- }
- }
-
- public static void debug(String message)
- {
- if (BuildConfig.DEBUG)
- {
- android.util.Log.d(TAG, message);
- }
- }
-
- public static void info(String message)
- {
- android.util.Log.i(TAG, message);
- }
-
- public static void warning(String message)
- {
- android.util.Log.w(TAG, message);
- }
-
- public static void error(String message)
- {
- android.util.Log.e(TAG, message);
- }
-
- public static void wtf(String message)
- {
- android.util.Log.wtf(TAG, message);
- }
-}
diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/utils/Log.kt b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/utils/Log.kt
new file mode 100644
index 0000000000..28a661ffd4
--- /dev/null
+++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/utils/Log.kt
@@ -0,0 +1,49 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+package org.dolphinemu.dolphinemu.utils
+
+import org.dolphinemu.dolphinemu.BuildConfig
+import android.util.Log as AndroidLog
+
+/**
+ * Contains methods that call through to [android.util.Log], but
+ * with the same TAG automatically provided. Also no-ops VERBOSE and DEBUG log
+ * levels in release builds.
+ */
+object Log {
+ private const val TAG = "Dolphin"
+
+ @JvmStatic
+ fun verbose(message: String) {
+ if (BuildConfig.DEBUG) {
+ AndroidLog.v(TAG, message)
+ }
+ }
+
+ @JvmStatic
+ fun debug(message: String) {
+ if (BuildConfig.DEBUG) {
+ AndroidLog.d(TAG, message)
+ }
+ }
+
+ @JvmStatic
+ fun info(message: String) {
+ AndroidLog.i(TAG, message)
+ }
+
+ @JvmStatic
+ fun warning(message: String) {
+ AndroidLog.w(TAG, message)
+ }
+
+ @JvmStatic
+ fun error(message: String) {
+ AndroidLog.e(TAG, message)
+ }
+
+ @JvmStatic
+ fun wtf(message: String) {
+ AndroidLog.wtf(TAG, message)
+ }
+}