-
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
Migrate filter_stdout plugin to v0.14 API #1058
Migrate filter_stdout plugin to v0.14 API #1058
Conversation
@@ -31,7 +30,7 @@ class StdoutFilter < Filter | |||
def configure(conf) | |||
super | |||
|
|||
@formatter = Plugin.new_formatter(@format) | |||
@formatter = Fluent::Plugin.new_formatter(@format) |
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.
This plugin should use :formatter
plugin helper to instantiate/configure Formatter instance.
But currently, there are no way to keep compatibility of configurations between styles of v0.12 (flat parameters of filter and formatter) and v0.14 (<format>
subsection).
I'll add that method and document. Please wait for a while.
This change depends on #1079 |
use `compat_parameters_convert` and `inject_values_to_record` to keep backward compatibility with flat style(v0.12) configuration.
a2102be
to
c1d6d1c
Compare
Because http://docs.fluentd.org/articles/filter_stdout describes `localtime` first.
Use helpers |
def configure(conf) | ||
conf['format'] ||= DEFAULT_FORMAT_TYPE |
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.
Don't do this operations.
Please use default_type
keyword argument of formatter_create
method instead.
Using |
OK, I will rewrite tests. |
Great. Thank you for contribution! |
No description provided.