-
Notifications
You must be signed in to change notification settings - Fork 65
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
Interest in byte-level tailing? #13
Comments
I have a project that would benefit from this. |
@gcla, I think it sounds very interesting. We need to think hard about the API to make sure we don't end with a Frankenstein-do-it-all API. So we have two options:
|
The former would be cleaner but the latter will take less time, given that gcla/tail works right now. @gcla what's your take on this? |
Hi @nxadm - my view is that I should follow the path you've set. :-) It looks to me as though the future of tail is in your new branch, and it would make sense to try to cleanly extend that to support byte-level tailing. What do you think? It would be a shame to retro-fit the old API, then have it be left behind. If you agree, I can try to make time to build on your branch with a byte-level approach - or maybe I should describe it as a non-CRLF approach. My very simple-minded view of the design, without even having got down into the weeds recently, is that It reads 1 byte at a time - it doesn't even try to buffer them up. Yuck! |
@gcla, I'll respond begin next week (aka a few days). I was AFK. Looking forward to the feature. |
@gcla, whatabout both ReadLine and ReadBytes methods? Reading one of the other is a very explicit show, so I don't see a problem with having two methods. It would make sense, though, to have one data structure. What I really would like is to test the new branch to see if the changes I made don't break it. It passes all tests, but maybe it's just an indication that we need more tests :). |
Issue #20 is related to this. |
I think it would be better to keep this package centered around text streams and leave the handling of binary streams to another package. |
Hi - I made use of a fork of the original
hpcloud/tail
repo in termshark to tail a pcap (packet capture) file. The output from the tail process is fed into sometshark
(CLI tool) processes which provide data for termshark's UI. Because pcaps are a binary format, I couldn't rely on a line-based tail to provide timely output fortshark
's input, so I made some cheesy modifications tohpcloud/tail
to tail in "chunks" of bytes. These chunks are not necessarily line-terminated, and possibly even 1-byte long if the pcap file being tailed grows very slowly. Would you be interested in these sorts of changes innxadm/tail
? If so, I could make a PR - and if you find it acceptable, I'd then switch termshark over to usenxadm/tail
. Thanks!The text was updated successfully, but these errors were encountered: