diff options
author | Charles Lombardo <clombardo169@gmail.com> | 2023-03-11 06:38:09 +0100 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2023-06-03 09:05:41 +0200 |
commit | de1dff557dcb6af28623c89cccfd58fd80eb41ed (patch) | |
tree | 2938211629a87c414326cf769585462922fa25be | |
parent | android: Convert GpuDriverMetadata to Kotlin (diff) | |
download | yuzu-de1dff557dcb6af28623c89cccfd58fd80eb41ed.tar yuzu-de1dff557dcb6af28623c89cccfd58fd80eb41ed.tar.gz yuzu-de1dff557dcb6af28623c89cccfd58fd80eb41ed.tar.bz2 yuzu-de1dff557dcb6af28623c89cccfd58fd80eb41ed.tar.lz yuzu-de1dff557dcb6af28623c89cccfd58fd80eb41ed.tar.xz yuzu-de1dff557dcb6af28623c89cccfd58fd80eb41ed.tar.zst yuzu-de1dff557dcb6af28623c89cccfd58fd80eb41ed.zip |
-rw-r--r-- | src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/Log.java | 39 | ||||
-rw-r--r-- | src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/Log.kt | 42 |
2 files changed, 42 insertions, 39 deletions
diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/Log.java b/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/Log.java deleted file mode 100644 index ccf54138d..000000000 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/Log.java +++ /dev/null @@ -1,39 +0,0 @@ -package org.yuzu.yuzu_emu.utils; - -import org.yuzu.yuzu_emu.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 = "Yuzu Frontend"; - - 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); - } -} diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/Log.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/Log.kt new file mode 100644 index 000000000..91e778b0e --- /dev/null +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/utils/Log.kt @@ -0,0 +1,42 @@ +package org.yuzu.yuzu_emu.utils + +import android.util.Log +import org.yuzu.yuzu_emu.BuildConfig + +/** + * 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 = "Yuzu Frontend" + + @JvmStatic + fun verbose(message: String) { + if (BuildConfig.DEBUG) { + Log.v(TAG, message) + } + } + + @JvmStatic + fun debug(message: String) { + if (BuildConfig.DEBUG) { + Log.d(TAG, message) + } + } + + @JvmStatic + fun info(message: String) { + Log.i(TAG, message) + } + + @JvmStatic + fun warning(message: String) { + Log.w(TAG, message) + } + + @JvmStatic + fun error(message: String) { + Log.e(TAG, message) + } +} |