@Bean
public LogRolloverCheck logRolloverCheck() {
org.apache.commons.configuration.Configuration conf = beanFactory
.getBean(org.apache.commons.configuration.Configuration.class);
long rolloverTime = conf.getLong(
CollectorProperties.WRITER.LOG_ROTATE_TIME.toString(),
(Long) CollectorProperties.WRITER.LOG_ROTATE_TIME
.getDefaultValue());
long inactiveTime = conf.getLong(
CollectorProperties.WRITER.LOG_ROTATE_INACTIVE_TIME.toString(),
(Long) CollectorProperties.WRITER.LOG_ROTATE_INACTIVE_TIME
.getDefaultValue());
long logSizeMb = conf
.getLong(CollectorProperties.WRITER.LOG_SIZE_MB.toString(),
(Long) CollectorProperties.WRITER.LOG_SIZE_MB
.getDefaultValue());
LOG.info("Using LogRollover: inactiveTime: " + inactiveTime
+ " rolloverTime: " + rolloverTime + " logSizeMb: " + logSizeMb);
return new SimpleLogRolloverCheck(rolloverTime, logSizeMb, inactiveTime);
}
LogWriterDI.java 文件源码
java
阅读 34
收藏 0
点赞 0
评论 0
项目:bigstreams
作者:
评论列表
文章目录