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

Log unused section configuration as warn level #629

Merged
merged 2 commits into from
Jul 14, 2015
Merged

Conversation

repeatedly
Copy link
Member

@tagomoris Could you check this?

@@ -30,9 +30,10 @@ def initialize(name, arg, attrs, elements, unused = nil)
@unused = unused || attrs.keys
@v1_config = false
@corresponding_proxies = [] # some plugins use flat parameters, e.g. in_http doesn't provide <format> section for parser.
@unused_in = false # if this element is not used in plugins, correspoing plugin name is set. otherwise nil.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

default value false is against to comment.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

other wise refers to "if this element is not used". I will add more line.

@repeatedly
Copy link
Member Author

Apply review. Please check again.

@sonots Could you check this too?

@repeatedly
Copy link
Member Author

Here is logged example:

2015-07-13 17:54:45 +0900 [info]: using configuration file: <ROOT>
  <source>
    type secure_forward
    self_hostname server.fqdn.example.com
    shared_key secret_string
    secure no
    private_key_passphrase xxxxxx
    <user>
      username test
      password test_pass
      <foo>
        a b
      </foo>
    </user>
    <test>
      foo bar
    </test>
  </source>
  <match debug.**>
    type stdout
    <test>
      c d
    </test>
  </match>
  <fil>
    type foo
  </fil>
  <matc foo.**>
    type bar
  </matc>
</ROOT>
2015-07-13 17:54:45 +0900 [warn]: section <foo> is not used in <user> of secure_forward plugin
2015-07-13 17:54:45 +0900 [warn]: section <test> is not used in <source> of secure_forward plugin
2015-07-13 17:54:45 +0900 [warn]: section <test> is not used in <match debug.**>
2015-07-13 17:54:45 +0900 [warn]: section <fil> is not used in <ROOT>
2015-07-13 17:54:45 +0900 [warn]: section <matc> is not used in <ROOT>

@repeatedly
Copy link
Member Author

If no problem, I will merge it today.

@repeatedly
Copy link
Member Author

If you ok, please merge this.

tagomoris added a commit that referenced this pull request Jul 14, 2015
Log unused section configuration as warn level
@tagomoris tagomoris merged commit 24d557d into master Jul 14, 2015
@sonots sonots deleted the warn-unused-section branch July 16, 2015 07:25
abicky added a commit to abicky/fluentd that referenced this pull request Aug 17, 2019
abicky added a commit to abicky/fluentd that referenced this pull request Aug 17, 2019
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