Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wushaobo opened this issue Feb 12, 2018 · 2 comments

Comments

@wushaobo
Copy link

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.

@snorecone
Copy link

Hi,

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

@brayancastrop
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants