Reduce tailwatcher argument#2832
Merged
Merged
Conversation
Signed-off-by: Yuta Iwama <ganmacs@gmail.com>
Signed-off-by: Yuta Iwama <ganmacs@gmail.com>
Signed-off-by: Yuta Iwama <ganmacs@gmail.com>
TailWatcher is not related to this Signed-off-by: Yuta Iwama <ganmacs@gmail.com>
and this log is no need to be put here Signed-off-by: Yuta Iwama <ganmacs@gmail.com>
Signed-off-by: Yuta Iwama <ganmacs@gmail.com>
Signed-off-by: Yuta Iwama <ganmacs@gmail.com>
Signed-off-by: Yuta Iwama <ganmacs@gmail.com>
Signed-off-by: Yuta Iwama <ganmacs@gmail.com>
cosmo0920
approved these changes
Feb 20, 2020
cosmo0920
left a comment
Contributor
There was a problem hiding this comment.
Looks reasonable for me.
And I added a nitpicks for logging messages in #update_watcher.
Is it copy and paste mistake?
| def update_watcher(path, pe) | ||
| log_msg = "detected rotation of #{path}" | ||
| log_msg << "; waiting #{@rotate_wait} seconds" # wait rotate_time if previous file exists | ||
|
|
Signed-off-by: Yuta Iwama <ganmacs@gmail.com>
repeatedly
reviewed
Feb 20, 2020
| def on_change(prev, cur) | ||
| @callback.call | ||
| rescue | ||
| # TODO log? |
| def update_watcher(path, pe) | ||
| log_msg = "detected rotation of #{path}" | ||
| log_msg << "; waiting #{@rotate_wait} seconds" # wait rotate_time if previous file exists | ||
| log.info(log_msg) |
| @update_watcher.call(@path, swap_state(@pe)) | ||
| else | ||
| @io_handler = IOHandler.new(self, &method(:wrap_receive_lines)) | ||
| @log.info "detected rotation of #{@path}" |
Member
Author
Signed-off-by: Yuta Iwama <ganmacs@gmail.com>
Signed-off-by: Yuta Iwama <ganmacs@gmail.com>
repeatedly
approved these changes
Feb 21, 2020
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.
Which issue(s) this PR fixes:
no
What this PR does / why we need it:
Reduce
TailWatcher's arguments. it's hard to maintain now.Docs Changes:
no
Release Note:
no