fix bug
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
package com.zhjt.mogo_core_function_devatools.scene
|
||||
|
||||
|
||||
//todo 1. SceneLogCache增加模块名称,提供场景需要
|
||||
//todo 2. 对特定场景提供数据, 网约车,调度...
|
||||
class SceneManager {
|
||||
|
||||
companion object {
|
||||
|
||||
@@ -4,27 +4,27 @@ import com.mogo.eagle.core.utilcode.mogo.logger.scene.Scene.Companion.scene
|
||||
|
||||
object CallerLogger {
|
||||
|
||||
fun i(tag: String, message: Any? = null) {
|
||||
fun i(tag: String, message: Any? = null, vararg args: Any?) {
|
||||
if (scene.check(tag)) {
|
||||
Logger.i(tag, message.toString())
|
||||
Logger.i(tag, message.toString(), *args)
|
||||
}
|
||||
}
|
||||
|
||||
fun d(tag: String, message: Any? = null) {
|
||||
fun d(tag: String, message: Any? = null, vararg args: Any?) {
|
||||
if (scene.check(tag)) {
|
||||
Logger.d(tag, message.toString())
|
||||
Logger.d(tag, message.toString(), *args)
|
||||
}
|
||||
}
|
||||
|
||||
fun w(tag: String, message: Any? = null) {
|
||||
fun w(tag: String, message: Any? = null, vararg args: Any?) {
|
||||
if (scene.check(tag)) {
|
||||
Logger.w(tag, message.toString())
|
||||
Logger.w(tag, message.toString(), *args)
|
||||
}
|
||||
}
|
||||
|
||||
fun e(tag: String, message: Any? = null) {
|
||||
fun e(tag: String, message: Any? = null, vararg args: Any?) {
|
||||
if (scene.check(tag)) {
|
||||
Logger.e(tag, message.toString())
|
||||
Logger.e(tag, message.toString(), *args)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -15,18 +15,11 @@ public final class Logger {
|
||||
return sPrinter.init(logLevel);
|
||||
}
|
||||
|
||||
public static void d(String tag, String message) {
|
||||
d(tag, message, (Object) null);
|
||||
}
|
||||
|
||||
public static void d(String tag, String message, Object... args) {
|
||||
if (isLoggable(LogLevel.DEBUG)) sPrinter.d(tag, message, args);
|
||||
}
|
||||
|
||||
public static void e(String tag, String message){
|
||||
e(tag,message, (Object) null);
|
||||
}
|
||||
|
||||
public static void e(String tag, String message, Object... args) {
|
||||
if (isLoggable(LogLevel.ERROR)) sPrinter.e(tag, null, message, args);
|
||||
}
|
||||
@@ -35,10 +28,6 @@ public final class Logger {
|
||||
if (isLoggable(LogLevel.ERROR)) sPrinter.e(tag, throwable, message, args);
|
||||
}
|
||||
|
||||
public static void i(String tag, String message) {
|
||||
i(tag, message, (Object) null);
|
||||
}
|
||||
|
||||
public static void i(String tag, String message, Object... args) {
|
||||
if (isLoggable(LogLevel.INFO)) sPrinter.i(tag, message, args);
|
||||
}
|
||||
@@ -47,10 +36,6 @@ public final class Logger {
|
||||
if (isLoggable(LogLevel.VERBOSE)) sPrinter.v(tag, message, args);
|
||||
}
|
||||
|
||||
public static void w(String tag, String message){
|
||||
w(tag,message, (Object) null);
|
||||
}
|
||||
|
||||
public static void w(String tag, String message, Object... args) {
|
||||
if (isLoggable(LogLevel.WARN)) sPrinter.w(tag, message, args);
|
||||
}
|
||||
|
||||
@@ -44,8 +44,6 @@ class Scene {
|
||||
val otherMap = SceneLogCache(mutableMapOf(), true)
|
||||
sceneCache[M_OTHER] = otherMap
|
||||
|
||||
//todo 1. SceneLogCache增加模块名称,提供场景需要
|
||||
//todo 2. 对特定场景提供数据, 网约车,调度...
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user