in src/main/java/com/aliyun/openservices/log/common/LocalFileConfigInputDetail.java [188:236]
protected void LocalFileConfigToJsonObject(JSONObject jsonObj) {
CommonConfigToJsonObject(jsonObj);
jsonObj.put(Consts.CONST_CONFIG_INPUTDETAIL_LOGPATH, logPath);
jsonObj.put(Consts.CONST_CONFIG_INPUTDETAIL_FILEPATTERN, filePattern);
jsonObj.put(Consts.CONST_CONFIG_INPUTDETAIL_LOGTYPE, logType);
jsonObj.put(Consts.CONST_CONFIG_INPUTDETAIL_TIMEFORMAT, timeFormat);
jsonObj.put(Consts.CONST_CONFIG_INPUTDETAIL_FILEENCODING, fileEncoding);
jsonObj.put(Consts.CONST_CONFIG_INPUTDETAIL_PRESERVE, preserve);
jsonObj.put(Consts.CONST_CONFIG_INPUTDETAIL_PRESERVERDEPTH, preserveDepth);
jsonObj.put(Consts.CONST_CONFIG_INPUTDETAIL_TOPICFORMAT, topicFormat);
jsonObj.put(Consts.CONST_CONFIG_INPUTDETAIL_MAXDEPTH, maxDepth);
jsonObj.put(Consts.CONST_CONFIG_INPUTDETAIL_DISCARDNONUTF8, discardNonUtf8);
jsonObj.put(Consts.CONST_CONFIG_INPUTDETAIL_TAILEXISTED, tailExisted);
jsonObj.put(Consts.CONST_CONFIG_INPUTDETAIL_ISDOCKERFILE, isDockerFile);
jsonObj.put(Consts.CONST_CONFIG_INPUTDETAIL_DELAYSKIPBYTES, delaySkipBytes);
jsonObj.put(Consts.CONST_CONFIG_INPUTDETAIL_DISCARDUNMATCH, discardUnmatch);
jsonObj.put(Consts.CONST_CONFIG_INPUTDETAIL_ADVANCED, advanced.toJsonObject());
JSONObject dockerIncludeEnvJson = new JSONObject();
for (Map.Entry<String, String> entry : dockerIncludeEnv.entrySet()) {
dockerIncludeEnvJson.put(entry.getKey(), entry.getValue());
}
jsonObj.put(Consts.CONST_CONFIG_INPUTDETAIL_DOCKER_INCLUDE_ENV, dockerIncludeEnvJson);
JSONObject dockerExcludeEnvJson = new JSONObject();
for (Map.Entry<String, String> entry : dockerExcludeEnv.entrySet()) {
dockerExcludeEnvJson.put(entry.getKey(), entry.getValue());
}
jsonObj.put(Consts.CONST_CONFIG_INPUTDETAIL_DOCKER_EXCLUDE_ENV, dockerExcludeEnvJson);
JSONObject dockerIncludeLabelJson = new JSONObject();
for (Map.Entry<String, String> entry : dockerIncludeLabel.entrySet()) {
dockerIncludeLabelJson.put(entry.getKey(), entry.getValue());
}
jsonObj.put(Consts.CONST_CONFIG_INPUTDETAIL_DOCKER_INCLUDE_LABEL, dockerIncludeLabelJson);
JSONObject dockerExcludeLabelJson = new JSONObject();
for (Map.Entry<String, String> entry : dockerExcludeLabel.entrySet()) {
dockerExcludeLabelJson.put(entry.getKey(), entry.getValue());
}
jsonObj.put(Consts.CONST_CONFIG_INPUTDETAIL_DOCKER_EXCLUDE_LABEL, dockerExcludeLabelJson);
if (!pluginDetail.isEmpty()) {
JSONObject pluginObject = JSONObject.parseObject(pluginDetail);
if (pluginObject != null) {
jsonObj.put(Consts.CONST_CONFIG_INPUTDETAIL_PLUGINDETAIL, pluginObject);
}
}
}