remote_syslog icon indicating copy to clipboard operation
remote_syslog copied to clipboard

The 'exclude_patterns' in config sample is implicit and lack of instruction

Open wushaobo opened this issue 7 years ago • 2 comments

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.

wushaobo avatar Feb 12 '18 08:02 wushaobo

Hi,

exclude_patterns is meant to match log lines, not log file names. If you want to exclude files, use exclude_files.

snorecone avatar Feb 12 '18 16:02 snorecone

What if what is wanted is to exclude patterns from specific files?

brayancastrop avatar Apr 07 '19 22:04 brayancastrop