From 0e4c1b3c17c39f1fcb894a5e461c432127850ffe Mon Sep 17 00:00:00 2001 From: Omar Basem Date: Wed, 10 Jan 2024 09:05:35 +0400 Subject: [PATCH] refactor: kotlinify log (#18337) refactor: kotlinify log --- .../src/test/java/android/util/Log.java | 23 ---------------- .../android/src/test/java/android/util/Log.kt | 27 +++++++++++++++++++ 2 files changed, 27 insertions(+), 23 deletions(-) delete mode 100644 modules/react-native-status/android/src/test/java/android/util/Log.java create mode 100644 modules/react-native-status/android/src/test/java/android/util/Log.kt diff --git a/modules/react-native-status/android/src/test/java/android/util/Log.java b/modules/react-native-status/android/src/test/java/android/util/Log.java deleted file mode 100644 index 69a8ecad11..0000000000 --- a/modules/react-native-status/android/src/test/java/android/util/Log.java +++ /dev/null @@ -1,23 +0,0 @@ -package android.util; - -public class Log { - public static int d(String tag, String msg) { - System.out.println("DEBUG: " + tag + ": " + msg); - return 0; - } - - public static int i(String tag, String msg) { - System.out.println("INFO: " + tag + ": " + msg); - return 0; - } - - public static int w(String tag, String msg) { - System.out.println("WARN: " + tag + ": " + msg); - return 0; - } - - public static int e(String tag, String msg) { - System.out.println("ERROR: " + tag + ": " + msg); - return 0; - } -} diff --git a/modules/react-native-status/android/src/test/java/android/util/Log.kt b/modules/react-native-status/android/src/test/java/android/util/Log.kt new file mode 100644 index 0000000000..d44e6732f8 --- /dev/null +++ b/modules/react-native-status/android/src/test/java/android/util/Log.kt @@ -0,0 +1,27 @@ +package android.util + +object Log { + @JvmStatic + fun d(tag: String, msg: String): Int { + println("DEBUG: $tag: $msg") + return 0 + } + + @JvmStatic + fun i(tag: String, msg: String): Int { + println("INFO: $tag: $msg") + return 0 + } + + @JvmStatic + fun w(tag: String, msg: String): Int { + println("WARN: $tag: $msg") + return 0 + } + + @JvmStatic + fun e(tag: String, msg: String): Int { + println("ERROR: $tag: $msg") + return 0 + } +}