#kqueue #watch #tail #view

bin+lib lw

Log-Watcher utility - replacement for: tail -F /some/path/* - that uses Kqueue to watch for new files as well…

21 releases

Uses new Rust 2024

0.8.1 Jul 24, 2026
0.6.11 Jul 15, 2026
0.6.10 Jul 3, 2022
0.6.7 Mar 14, 2021
0.4.4 Mar 31, 2019

#2497 in Filesystem

MIT license

49KB
880 lines

LogWatcher

LogWatcher is an utility meant as a replacement for: tail -F /some/path/*.

lw vs tail advantages:

  • it watches for modified, deleted and new files without restart of the utility
  • it won't crash if there are > 4096 files (shell pattern limit exhaustion) or directories (if you set ulimit -n value high enough)
  • it works recursively on directories

Author:

Daniel (@dmilith) Dettlaff

Features:

  • Uses Kqueue for event monitoring (standard on BSD and macOS)

  • Works recursively through files/ directories but can be also used for single file monitoring

  • It's fast and DEBUG'able (through DEBUG and TRACE env variables)

  • Produces colorful output (especially in DEBUG and TRACE mode).

Installation:

cargo install --force lw

Software requirements:

  • Rust >= 1.40.0

Additional build requirements:

  • Clang >= 10.x
  • Make >= 3.x
  • Cmake >= 3.16
  • POSIX compliant base-system (tested on systems: FreeBSD/ HardenedBSD/ Darwin)

License

  • BSD

  • MIT

Dependencies

~5–15MB
~133K SLoC