use tailhead instead of tailer so as to handle rotating logs#29
use tailhead instead of tailer so as to handle rotating logs#29mdgart merged 5 commits intomdgart:masterfrom
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.
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.
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
tailertotailheadin order to take advantage oftailheadability to follow a filename.