- type: log id: test_yt_search_crawler-output enabled: true paths: - /data/webapps/test_yt_search_crawler/output.log fields: application: yt_search_crawler # 自定义字段,标识应用名称 log_type: yt_search_crawler_output.log # 自定义字段,标识日志类型 environment: test # 自定义字段,标识机器环境名称 fields_under_root: true multiline.pattern: '^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2},\d{3}' multiline.negate: true multiline.match: after ignore_older: 24h # 忽略旧日志文件(避免处理已归档的日志) scan_frequency: 10s # 定期扫描新文件的频率 clean_inactive: 25h # 清除超过一天未更新的文件 close_inactive: 5m # 文件超过5分钟无更新则关闭 close_renamed: true # 处理被重命名的文件 start_position: beginning # 从文件的开头读取