echo '{"key1": 123456, "key2": "abcd"}' >> /home/test-log/json.log
enable: true
inputs:
- Type: file_log
LogPath: /home/test-log/
FilePattern: key_value.log
processors:
- Type: processor_json
SourceKey: content
KeepSource: false
ExpandDepth: 1
ExpandConnector: ""
- Type: processor_drop
DropKeys:
- key1
flushers:
- Type: flusher_sls
Endpoint: cn-xxx.log.aliyuncs.com
ProjectName: test_project
LogstoreName: test_logstore
- Type: flusher_stdout
OnlyStdout: true
{
"__tag__:__path__": "/home/test-dir/test_log/json.log",
"key2": "abcd",
"__time__": "1657354602"
}