Browse Source

REPORT-33858 日志死循环的问题

feature/big-screen
rinoux 4 years ago
parent
commit
a458266ea1
  1. 7
      designer-realize/src/main/java/com/fr/design/mainframe/errorinfo/ErrorInfoLogAppender.java

7
designer-realize/src/main/java/com/fr/design/mainframe/errorinfo/ErrorInfoLogAppender.java

@ -147,8 +147,11 @@ public class ErrorInfoLogAppender extends AppenderSkeleton {
}
};
try {
file.readStream(new ByteArrayInputStream(WorkContext.getWorkResource().readFully(StableUtils.pathJoin(ProjectConstants.REPORTLETS_NAME, bookPath))));
return file.getTemplateID();
//如果bookPath是null,ResourceIOUtils会因为无法读取文件夹的流输出error日志,输出日志会再次走到这里,引起死循环
if (StringUtils.isNotBlank(bookPath)) {
file.readStream(new ByteArrayInputStream(WorkContext.getWorkResource().readFully(StableUtils.pathJoin(ProjectConstants.REPORTLETS_NAME, bookPath))));
return file.getTemplateID();
}
} catch (Exception ignore) {
}

Loading…
Cancel
Save