This commit is contained in:
2022-07-23 10:49:28 +08:00
parent 10675c373a
commit c10abbe82e
2 changed files with 28 additions and 6 deletions

View File

@@ -6,7 +6,7 @@ public class Log {
}
public static void i(Object log) {
if (ConfigTools.load(ConfigTools.CONFIG, "logout",boolean.class,false)) {
if (ConfigTools.load(ConfigTools.CONFIG, "logout", boolean.class, false)) {
System.out.printf("[%s]%s%n",
AppTools.getToDayNowTimeToString(),
log
@@ -14,11 +14,20 @@ public class Log {
}
}
public static void e(String tag,Exception e){
public static void e(String tag, Exception e) {
System.err.printf("[%s]%s - %s%n",
AppTools.getToDayNowTimeToString(),
tag,
AppTools.getExceptionString(e)
);
);
}
public static void i(Object tag, Object log) {
if (tag instanceof String) {
i("[" + tag + "]" + log);
} else {
i(tag.getClass().getSimpleName(), log);
}
}
}