日志格式化优化

This commit is contained in:
hubin 2024-09-21 09:42:50 +08:00
parent 20ab65012a
commit 530e23a6de
4 changed files with 4 additions and 4 deletions

View File

@ -72,7 +72,7 @@ public class BeetlTemplateEngine extends AbstractTemplateEngine {
template.binding(objectMap);
template.renderTo(fileOutputStream);
}
LOGGER.debug("模板:" + templatePath + "; 文件:" + outputFile);
LOGGER.debug("模板:{}; 文件:{}", templatePath, outputFile);
}
@Override

View File

@ -52,7 +52,7 @@ public class EnjoyTemplateEngine extends AbstractTemplateEngine {
BufferedWriter writer = new BufferedWriter(ow)) {
writer.append(str);
}
LOGGER.debug("模板:" + templatePath + "; 文件:" + outputFile);
LOGGER.debug("模板:{}; 文件:{}", templatePath, outputFile);
}
@Override

View File

@ -51,7 +51,7 @@ public class FreemarkerTemplateEngine extends AbstractTemplateEngine {
try (FileOutputStream fileOutputStream = new FileOutputStream(outputFile)) {
template.process(objectMap, new OutputStreamWriter(fileOutputStream, ConstVal.UTF8));
}
LOGGER.debug("模板:" + templatePath + "; 文件:" + outputFile);
LOGGER.debug("模板:{}; 文件:{}", templatePath, outputFile);
}

View File

@ -72,7 +72,7 @@ public class VelocityTemplateEngine extends AbstractTemplateEngine {
BufferedWriter writer = new BufferedWriter(ow)) {
template.merge(new VelocityContext(objectMap), writer);
}
LOGGER.debug("模板:" + templatePath + "; 文件:" + outputFile);
LOGGER.debug("模板:{}; 文件:{}", templatePath, outputFile);
}