Merged
Conversation
…rser/formatter and inject(/extract)
Member
Author
|
@repeatedly could you review this change? |
| config_param :time_key, :string, default: nil | ||
| config_param :time_type, :enum, list: [:float, :unixtime, :string], default: :float | ||
|
|
||
| Fluent::TimeMixin::TIME_PARAMETERS.each do |name, type, opts| |
Member
There was a problem hiding this comment.
Why don't you use include Fluent::TimeMixin::TimeParameters?
Member
Author
There was a problem hiding this comment.
Because that mixin adds parameters on the top namespace, not in <extract> sections.
Member
There was a problem hiding this comment.
I see. implementation limitation...
Member
|
Off topic. Cache machanizm of parser / formatter becomes overhead for msec / nsec times. |
| Fluent::Test.setup | ||
| end | ||
|
|
||
| def test_call_with_parse |
Member
Author
There was a problem hiding this comment.
I have no idea: it's just moved from test/plugin/test_parser_time.rb to there.
Member
|
Other LGTM. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This patch is to provide consistent API about time and tag, handling these on records.
Provided things:
#callmethod (and#parse/#format)With this patch, formatter plugins can get TimeFormatter instances anytime via
time_formatter_createmethod with configured format/timezone by users in<format>section.Parser plugins also does it via
time_parser_create.Input/Output plugins can use
inject/extractplugin helpers with just same configuration parameter names. It provides consistent how-to-use for users.