-
Notifications
You must be signed in to change notification settings - Fork 18
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
use tailhead instead of tailer so as to handle rotating logs #29
Conversation
@fgregg linters are failing, can you take a look? |
pip has removed installing from dependency links by default. I'll wait a couple of days to see if the maintainers of tailer want to bring in that PR. If they don't I'll get a version with log rotation on pypi and revisit this PR. |
I think that Pipfile and Pipfile.lock will need be updated, but I'm not really familiar with those files. attn @bittner |
self.params, | ||
self.site, | ||
self.logger) | ||
if line is not None: |
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 can be simply
if line:
... which is pythonic. Also, an empty line wouldn't need to be parsed, right?
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 agree
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 think an empty line could be important to parse. Empty lines are often used as separators. Not used that way for nginx, but this part of the code is not nginx specific.
Re Pipfile, the line with Afterwards, run |
Let me decide what you want to do with falsy lines. Otherwise I think this is good to go @mdgart |
ok, I'm merging it |
The current version of tailer does not follow the name of a file, it follows a file descriptor. This means that if you rotate the log files, sentrylogs will not see any of the new information in the new file.
This PR six8/pytailer#12 adds code into the tailer's follow method to change the behavior to follow a filename.This PR swaps out the tailing dependency from
tailer
totailhead
in order to take advantage oftailhead
ability to follow a filename.