/**
* Handles append time behavior for CompositeRollingAppender. This checks
* if a roll over either by date (checked first) or time (checked second)
* is need and then appends to the file last.
*/
protected void subAppend(LoggingEvent event) {
if (rollDate) {
long n = System.currentTimeMillis();
if (n >= nextCheck) {
now.setTime(n);
nextCheck = rc.getNextCheckMillis(now);
rollOverTime();
}
}
if (rollSize) {
if ((fileName != null) && ((CountingQuietWriter) qw).getCount() >= maxFileSize) {
rollOverSize();
}
}
super.subAppend(event);
}
CompositeRollingAppender.java 文件源码
java
阅读 27
收藏 0
点赞 0
评论 0
项目:nabs
作者:
评论列表
文章目录