ilogtail
ilogtail copied to clipboard
feat: legacy config provider
- 调整 iLogtail 的 config provider 的结构,允许私有实现 config provider
- 为iLogtail 2.0添加一个兼容1.0配置的config provider,名为LegacyCommonConfigProvider: 每隔10s检查user_yaml_config.d/下的yaml文件,如果发生变动,修改格式之后复制到config/legacy/目录下:
旧文件simple.yaml:
enable: true
inputs:
- Type: file_log
LogPath: .
FilePattern: simple.log
MaxDepth: 10
flushers:
- Type: flusher_stdout
OnlyStdout: true
新文件simple.yaml:
enable: true
inputs:
- Type: input_file
MaxDirSearchDepth: 10
FilePaths:
- ./**/simple.log
flushers:
- Type: flusher_stdout
OnlyStdout: true
同时,如果有version:v2字段,也会改成global: StructureType: v2. 旧文件yaml:
enable: true
version: v2
inputs:
- Type: service_uds_server
新文件yaml:
enable: true
global:
StructureType: v2
inputs:
- Type: service_uds_server