-
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
Add parser&filter support for compat_parameters plugin helper #1079
Add parser&filter support for compat_parameters plugin helper #1079
Conversation
5622485
to
b50715f
Compare
…y defined in superclass
…written by plugins
…nage it in v0.14)
…arser by using inject plugin helper in filter/output plugin side with conversion of configuration + automated inject_* method invocation for compat plugins
…nique formatter to handle it by itself
…emoved from formatter
…inject plugin helper
b50715f
to
fc380f8
Compare
@repeatedly Hi, could you please review this? |
|
||
parser_params = {} | ||
PARSER_PARAMS.each do |older, newer| | ||
next unless newer |
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.
PARSER_PARAMS
doesn't have false
/nil
value.
Is this unless
for safety?
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.
Yes. Someone might add another entry which has nil
value.
Others are LGTM |
I added commits for review comments. |
This pull-request adds some methods to convert v0.12 style parser/formatter parameters to v0.14 style. (flat "format" parameter ->
@type
in<format>
section)With this plugin helper, users can move to v0.14 without any modification on configuration file about formatting/parsing.
This change requires some changes listed below:
default_type
keyword argument in methods of parser/formatter/storage plugin helpers to specify default type of these plugins even without any subsections for these pluginsinject
plugin helper to simulate HandleTagAndTimeMixin in compat filter/output plugins in defaultGenerally speaking, injecting tag/time into records are not of formatter, but filter and output plugins (there are many plugins to do it without formatter plugins). It's best to migrate to use just a code (inject plugin helper) from many similar code in many files.