Skip to content
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

Test on MacOS #2

Open
happybeing opened this issue Aug 18, 2020 · 3 comments
Open

Test on MacOS #2

happybeing opened this issue Aug 18, 2020 · 3 comments
Labels
help wanted Extra attention is needed

Comments

@happybeing
Copy link
Owner

logtail may well 'just work' on MacOS, but I have no way to test this.

If you can test it and let me know it it builds and works, that would be great.

@happybeing happybeing added good first issue Good for newcomers help wanted Extra attention is needed labels Aug 18, 2020
@jmagnuson
Copy link

Popping in to say that I did a quick test with logtail on OSX, and there are a couple things:

  1. All the unit tests in linemux are crafted such that files are created/appended and then flushed to ensure that the appropriate filesystem events were dispatched for each target platform. As such, I fail to cover real-world applications like what gets logged in /var/log, which do not follow the same logging semantics. So if I run linemux's events example on /var/log/wifi.log and switch wifi networks, I would expect to pick up some sort of file modification event but do not. I'll take a closer look at FsEventWatcher and see if there's anything salvageable in there.

  2. However, for the case of tailing echo asdf >> foo.txt, linemux picks that change up just fine in OSX and you can also see it propagating in logtail while running dtruss, but something is preventing it from getting displayed in the tui window. Works fine in linux of course.

Cool app though, I'll definitely be using it to monitor messages, fail2ban.log, etc.!

@happybeing
Copy link
Owner Author

Thanks very much for testing this, and for linemux. To clarify, does the above mean that no logfile changes are being displayed in logterm on MacOS?

  1. However, for the case of tailing echo asdf >> foo.txt, linemux picks that change up just fine in OSX and you can also see it propagating in logtail while running dtruss, but something is preventing it from getting displayed in the tui window. Works fine in linux of course.

I wonder if this is to do with how futures work on different OS? I may well have strayed from idiomatic or sensible code here as I just fiddled about until it worked on Linux. Or it could be the event mechanism. Events are slightly different with the termion and crossterm backends do it might be worth you comparing the behaviour of logtail (termion) and logtail-crossterm, although that's a long shot.

Cool app though, I'll definitely be using it to monitor messages, fail2ban.log, etc.!

This makes me very happy! Thank you very much for checking it out on Mac and for linemux. That, tui-rs and the tui backends are doing most the work, but for anyone to find my first Rust program useful is brilliant.

@happybeing happybeing removed the good first issue Good for newcomers label Aug 22, 2020
@jmagnuson
Copy link

Hi there, notify-rs just recently added support for using kqueue in MacOS rather than fsevents, which fixes the issues discussed here. I've got a PR in linemux to support this change (jmagnuson/linemux#48) which should get merged/released once notify-rs gets a new release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants