remote_syslog
remote_syslog copied to clipboard
The 'exclude_patterns' in config sample is implicit and lack of instruction
The usage of exclude_patterns in the config yaml is confusing. A clear example or instruction should be provided to users.
Quote from master/examples/log_files.yml.example.advanced
exclude_patterns:
- exclude this
- \d+ things
This sample/instruction is kidding on the format.
It seems the exclude_patterns
does not support either the plain path or the Regex pattern, as I tested.
The following config failed to exclude the log from the file at /LOG/FOLDER/tmp-stderr.log
.
files:
- /LOG/FOLDER/*.log
destination:
host: #########
port: #########
protocol: tls
exclude_patterns:
- .*tmp.+\.log$
- /LOG/FOLDER/tmp-stderr.log
Please let me know the mistake I might have made in the test.
Hi,
exclude_patterns
is meant to match log lines, not log file names. If you want to exclude files, use exclude_files
.
What if what is wanted is to exclude patterns from specific files?