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

Add warning when file input has no matches #13

Merged
merged 1 commit into from
Jul 10, 2020
Merged

Conversation

camdencheek
Copy link
Contributor

@camdencheek camdencheek commented Jul 9, 2020

Description of Changes

A common user error is pointing to the incorrect path with the file input. It's often not clear this is the issue because you just see no logs coming through.

This PR adds a warning message if, when first starting up, the file input plugin doesn't find any files that match its include patterns.

{
  "level": "warn",
  "timestamp": "2020-07-09T11:19:19.243-0400",
  "message": "no files match the configured include patterns",
  "plugin_id": "$.file",
  "plugin_type": "file_input",
  "include": [
    "./test/asdfasdf"
  ]
}

Please check that the PR fulfills these requirements

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • Add a changelog entry (for non-trivial bug fixes / features)
  • CI passes

@camdencheek camdencheek requested a review from jmwilliams89 July 9, 2020 15:22
@codecov
Copy link

codecov bot commented Jul 9, 2020

Codecov Report

Merging #13 into master will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #13      +/-   ##
==========================================
+ Coverage   75.73%   75.74%   +0.01%     
==========================================
  Files          61       61              
  Lines        3593     3595       +2     
==========================================
+ Hits         2721     2723       +2     
  Misses        649      649              
  Partials      223      223              
Impacted Files Coverage Δ
plugin/builtin/input/file/file.go 78.80% <100.00%> (+0.15%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 32d21f6...01a1edb. Read the comment docs.

@camdencheek camdencheek merged commit 541d164 into master Jul 10, 2020
@camdencheek camdencheek deleted the warn-on-no-matches branch July 10, 2020 16:59
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

Successfully merging this pull request may close these issues.

2 participants