-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
dsl: Need '@' prefix for reserved system parameters. fix #2028 #2034
Conversation
Signed-off-by: Masahiro Nakagawa <repeatedly@gmail.com>
lib/fluent/config/dsl.rb
Outdated
@@ -22,6 +22,8 @@ | |||
module Fluent | |||
module Config | |||
module DSL | |||
SYSTEM_PARAM = [:type, :id, :log_level] # Add '@' prefix to avoid deprecation message |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about RESERVED_PARAMETERS
?
https://github.com/fluent/fluentd/blob/master/lib/fluent/config/element.rb#L46-L52
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any chance to handle label
, too?
diff --git a/lib/fluent/config/dsl.rb b/lib/fluent/config/dsl.rb
index c315a3f1..c8a0bb78 100644
--- a/lib/fluent/config/dsl.rb
+++ b/lib/fluent/config/dsl.rb
@@ -22,7 +22,7 @@ require 'fluent/config/element'
module Fluent
module Config
module DSL
- SYSTEM_PARAM = [:type, :id, :log_level] # Add '@' prefix to avoid depreca
tion message
+ SYSTEM_PARAM = [:type, :id, :log_level, :label] # Add '@' prefix to avoid
deprecation message
module Parser
def self.read(path)
can handle label parameter with the following configuration:
source {
type :forward
label :"@forward"
}
label('@forward') {
filter('**') {
type :stdout
}
match('**') {
type :null
}
}
Signed-off-by: Masahiro Nakagawa <repeatedly@gmail.com>
Signed-off-by: Masahiro Nakagawa <repeatedly@gmail.com>
Applied reviews. |
Some tests are failed: https://travis-ci.org/fluent/fluentd/jobs/396700315#L554 We should resolve testcase failures before merging this PR. |
Signed-off-by: Masahiro Nakagawa <repeatedly@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM except for still failing test.
https://travis-ci.org/fluent/fluentd/jobs/396706505#L554
Signed-off-by: Masahiro Nakagawa <repeatedly@gmail.com>
Signed-off-by: Masahiro Nakagawa repeatedly@gmail.com