修改数据源配置

This commit is contained in:
2026-02-02 22:38:14 +08:00
parent e37ead63a3
commit bce96164c2

View File

@@ -21,8 +21,7 @@ public class LoggerUtils {
private String baseLogPath;
// 日期格式文件名yyyyMMdd日志内容时间戳yyyy-MM-dd HH:mm:ss.SSS
private final SimpleDateFormat fileDateFormat = new SimpleDateFormat("yyyyMMdd");
private final SimpleDateFormat logDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");
// 线程安全锁
@@ -65,11 +64,8 @@ public class LoggerUtils {
}
}
/**
* 获取当前日志文件路径按日期拆分baseLogPath/log_yyyyMMdd.txt
*/
private String getCurrentLogFilePath(Level level) {
String fileName = level + "_" + fileDateFormat.format(new Date()) + ".log";
String fileName = level + "_APP" + ".log";
return baseLogPath + File.separator + fileName;
}
@@ -166,8 +162,7 @@ public class LoggerUtils {
}
StringBuilder sb = new StringBuilder();
for (Object msg : messages) {
// 任意类型转换为字符串null转为"null"其他类型调用String.valueOf()
sb.append(String.valueOf(msg));
sb.append(msg);
}
return sb.toString();
}