public class LogConfig extends Object
| 构造器和说明 |
|---|
LogConfig() |
| 限定符和类型 | 方法和说明 |
|---|---|
String |
getFileEncoding()
默认 UTF-8
可选值 UTF-8
|
String |
getFilePattern()
文件通配符
|
List<String> |
getFilterKey()
用于过滤日志所用到的key,只有key的值满足对应filterRegex列中设定的正则表达式日志才是符合要求的
|
List<String> |
getFilterRegex()
和每个filterKey对应的正正则表达式, filterRegex的长度和filterKey的长度必须相同
|
List<String> |
getKey()
日志提取后所生成Key
|
Boolean |
getLocalStorage()
cache in local storage
|
String |
getLogBeginRegex()
多行日志行首匹配
|
String |
getLogPath()
log目录
|
String |
getLogType()
目前只支持common_reg_log
|
Boolean |
getPreserve()
rue代表监控目录永不超时,false代表监控目录30分钟超时,默认值为true
|
Long |
getPreserveDepth()
当设置preserve为false时,指定监控不超时目录的深度,最大深度支持3
|
String |
getRegex()
正则匹配
|
String |
getSampleLog()
示例日志
|
String |
getTimeFormat()
日期格式
|
String |
getTopicFormat()
topic生成方式,支持四种类型:1)用于将日志文件路径的某部分作为topic,如/var/log/(.*).log;
//2)none,表示topic为空;3)default,表示将日志文件路径作为topic;4)group_topic,表示将应用该配置的机器组topic属性作为topic。
|
void |
setFileEncoding(String fileEncoding)
默认 UTF-8
可选值 UTF-8
|
void |
setFilePattern(String filePattern)
文件通配符
|
void |
setFilterKey(List<String> filterKey)
用于过滤日志所用到的key,只有key的值满足对应filterRegex列中设定的正则表达式日志才是符合要求的
|
void |
setFilterRegex(List<String> filterRegex)
和每个filterKey对应的正正则表达式, filterRegex的长度和filterKey的长度必须相同
|
void |
setKey(List<String> key)
日志提取后所生成Key
|
void |
setLocalStorage(Boolean localStorage)
cache in local storage
|
void |
setLogBeginRegex(String logBeginRegex)
多行日志行首匹配
|
void |
setLogPath(String logPath)
log目录
|
void |
setLogType(String logType)
目前只支持common_reg_log
|
void |
setPreserve(Boolean preserve)
rue代表监控目录永不超时,false代表监控目录30分钟超时,默认值为true
|
void |
setPreserveDepth(Long preserveDepth)
当设置preserve为false时,指定监控不超时目录的深度,最大深度支持3
|
void |
setRegex(String regex)
正则匹配
|
void |
setSampleLog(String sampleLog)
示例日志
|
void |
setTimeFormat(String timeFormat)
日期格式
|
void |
setTopicFormat(String topicFormat)
topic生成方式,支持四种类型:1)用于将日志文件路径的某部分作为topic,如/var/log/(.*).log;
//2)none,表示topic为空;3)default,表示将日志文件路径作为topic;4)group_topic,表示将应用该配置的机器组topic属性作为topic。
|
public String getFileEncoding()
public void setFileEncoding(String fileEncoding)
public String getFilePattern()
public void setFilePattern(String filePattern)
public List<String> getFilterKey()
public void setFilterKey(List<String> filterKey)
public List<String> getFilterRegex()
public void setFilterRegex(List<String> filterRegex)
public Boolean getLocalStorage()
public void setLocalStorage(Boolean localStorage)
public String getLogBeginRegex()
public void setLogBeginRegex(String logBeginRegex)
public String getLogPath()
public void setLogPath(String logPath)
public String getLogType()
public void setLogType(String logType)
public Boolean getPreserve()
public void setPreserve(Boolean preserve)
public Long getPreserveDepth()
public void setPreserveDepth(Long preserveDepth)
public String getRegex()
public void setRegex(String regex)
public String getSampleLog()
public void setSampleLog(String sampleLog)
public String getTimeFormat()
public void setTimeFormat(String timeFormat)
public String getTopicFormat()
public void setTopicFormat(String topicFormat)
Copyright © 2019. All Rights Reserved.