fix bug of class name of interface

This commit is contained in:
zhongchao
2022-03-15 19:11:06 +08:00
parent afec70680f
commit be10caa417
8 changed files with 104 additions and 83 deletions

View File

@@ -6,25 +6,25 @@ object CallerLogger {
fun i(tag: String, message: Any? = null) {
if (scene.check(tag)) {
Logger.i(tag, message.toString(), null)
Logger.i(tag, message.toString())
}
}
fun d(tag: String, message: Any? = null) {
if (scene.check(tag)) {
Logger.d(tag, message.toString(), null)
Logger.d(tag, message.toString())
}
}
fun w(tag: String, message: Any? = null) {
if (scene.check(tag)) {
Logger.w(tag, message.toString(), null)
Logger.w(tag, message.toString())
}
}
fun e(tag: String, message: Any? = null) {
if (scene.check(tag)) {
Logger.e(tag, message.toString(), null)
Logger.e(tag, message.toString())
}
}

View File

@@ -15,43 +15,59 @@ public final class Logger {
return sPrinter.init(logLevel);
}
public static void d( String tag, String message, Object... args) {
if(isLoggable(LogLevel.DEBUG)) sPrinter.d(tag, message, args);
public static void d(String tag, String message) {
d(tag, message, (Object) null);
}
public static void e( String tag, String message, Object... args) {
if(isLoggable(LogLevel.ERROR)) sPrinter.e(tag, null, message, args);
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, Throwable throwable, String message, Object... args) {
if(isLoggable(LogLevel.ERROR)) sPrinter.e(tag, throwable, message, args);
public static void e(String tag, String message){
e(tag,message, (Object) null);
}
public static void i( String tag, String message, Object... args) {
if(isLoggable(LogLevel.INFO)) sPrinter.i(tag, message, args);
public static void e(String tag, String message, Object... args) {
if (isLoggable(LogLevel.ERROR)) sPrinter.e(tag, null, message, args);
}
public static void v( String tag, String message, Object... args) {
if(isLoggable(LogLevel.VERBOSE)) sPrinter.v(tag, message, args);
public static void e(String tag, Throwable throwable, String message, Object... args) {
if (isLoggable(LogLevel.ERROR)) sPrinter.e(tag, throwable, message, args);
}
public static void w( String tag, String message, Object... args) {
if(isLoggable(LogLevel.WARN)) sPrinter.w(tag, message, args);
public static void i(String tag, String message) {
i(tag, message, (Object) null);
}
public static void easyLog( String tag, String message) {
if(isLoggable(LogLevel.DEBUG)) sPrinter.d(tag, message);
public static void i(String tag, String message, Object... args) {
if (isLoggable(LogLevel.INFO)) sPrinter.i(tag, message, args);
}
public static void json( String tag, String json) {
if(isLoggable(LogLevel.DEBUG)) sPrinter.json(tag, json);
public static void v(String tag, String message, Object... args) {
if (isLoggable(LogLevel.VERBOSE)) sPrinter.v(tag, message, args);
}
public static void xml( String tag, String xml) {
if(isLoggable(LogLevel.DEBUG)) sPrinter.xml(tag, xml);
public static void w(String tag, String message){
w(tag,message, (Object) null);
}
private static boolean isLoggable(LogLevel logLevel){
public static void w(String tag, String message, Object... args) {
if (isLoggable(LogLevel.WARN)) sPrinter.w(tag, message, args);
}
public static void easyLog(String tag, String message) {
if (isLoggable(LogLevel.DEBUG)) sPrinter.d(tag, message);
}
public static void json(String tag, String json) {
if (isLoggable(LogLevel.DEBUG)) sPrinter.json(tag, json);
}
public static void xml(String tag, String xml) {
if (isLoggable(LogLevel.DEBUG)) sPrinter.xml(tag, xml);
}
private static boolean isLoggable(LogLevel logLevel) {
return sPrinter.getSettings().getLogLevel().level <= logLevel.level;
}
}