public void configure(Context context) {
batchUpperLimit = context.getInteger("batchUpperLimit",1);
PropertyConfigurator.configure(PropertyUtil.getCurrentConfPath() + "log4j.properties");
log.info(PropertyUtil.getCurrentConfPath() + "log4j.properties");
prop.put("fileRootDir", context.getString("fileRootDir",""));
//批量提交Event个数
prop.put("batchUpperLimit", context.getString("batchUpperLimit","1"));
//获取快照文件存放根目录
prop.put("backupFileDirPath", context.getString("backupFileDirPath", ""));
// // 目录文件组合方式 0:文件log4j滚动、1:文件非log4j滚动
// // 2:日期目录+文件log4j滚动 3:日期目录+文件非log4j滚动
// prop.put("rollType", context.getString("rollType",""));
// 日期目录
// prop.put("dateDir", context.getString("dateDir",""));
// 文件前缀(实时文件名前缀)
prop.put("filePrefix", context.getString("filePrefix",""));
// 文件后缀
prop.put("fileSuffix", context.getString("fileSuffix",""));
// 文件字符集
prop.put("charset", context.getString("charset", "UTF-8"));
// 文件字符集
prop.put("bufferSize", context.getString("bufferSize", "4096"));
//设置正则表达式匹配的文件名
prop.put("regexFileName", context.getString("regexFileName", ".*"));
prop.put("clearTimeInterval", context.getString("clearTimeInterval", "3600000"));
}
FileTailerSource.java 文件源码
java
阅读 16
收藏 0
点赞 0
评论 0
项目:improved-journey
作者:
评论列表
文章目录