-
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 tail_path option to in_tail plugin #951
Conversation
@@ -252,6 +254,7 @@ def flush_buffer(tw) | |||
else | |||
@tag | |||
end | |||
record[@path_key] ||= tw.path unless @path_key.nil? |
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.
Using ||=
is 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
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.
I mean that path_key
is not overwritten if record already has it.
This was the specification of the original implementation (#281), but we can change the spec now. Do you prefer to overwrite?
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.
Either is fine for me.
BTW, user can check path_key value is not contained or not easily so
additional check is not needed for me.
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.
Okay, let us keep as is (not to overwrite).
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.
I follow your opinion
Thx! |
Add tail_path option to in_tail plugin
Tests added by this change in |
@tagomoris sorry, fixed the unstable test. |
Because Fluentd v0.14 includes this feature. see: fluent/fluentd#951
Because in_tail_path had been merged in in_tail in v0.14. ref: fluent/fluentd#945 ref: fluent/fluentd#951
Because in_tail_path had been merged in in_tail in v0.12. ref: fluent/fluentd#945 ref: fluent/fluentd#951
Fix #945