-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix logfile tailing under Node 10.16.0
`fs.watch` does not consistently emit `'change'` events on Node 10.16.0, possibly due to nodejs/node#29460. `fs.watchFile` still works, but is less efficient, per the docs, so fall back to that only if necessary and also suggest that users run custody under an older version of Node. I explored several Node file-watching libraries (e.g. chokidar, sane) to try to find a more performant solution for Node 10.16.0 and it seems that they pretty much all fall back to `fs.watch` / `fs.watchFile`, unfortunately. sane offers the option to use watchman, but that requires installing a daemon so is a non-starter. Fixes #82. #83 tracks reverting this when the underlying Node issue has been fixed. Tested that log files update both when running custody under v8.9.3 and v10.16.0, and that `node-tail` only uses `fs.watchFile` in the latter.
- Loading branch information
Showing
4 changed files
with
59 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters