调整日志打印参数优先级

This commit is contained in:
2026-04-25 11:33:05 +08:00
parent 36ec316998
commit 07be576c06
2 changed files with 22 additions and 3 deletions

View File

@@ -321,8 +321,14 @@ public class LogBus implements BaseParams {
logBody.setStackTrace(fmtStackTrace(stackTrace, geWarn ? null : config.getIncludeStackTrace()));
// 是否打印日志
if (geWarn || (Objects.nonNull(print) ? print : config.getPrint().booleanValue())) {
printLog(logBody);
if (Objects.nonNull(print)) {
if (print) {
printLog(logBody);
}
} else {
if (geWarn || config.getPrint()) {
printLog(logBody);
}
}
// 异常日志不做忽略
if (!geWarn) {