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

Fix logfile tailing under Node 10.16.0 #84

Merged
merged 2 commits into from
Sep 20, 2019
Merged

Commits on Sep 19, 2019

  1. Configuration menu
    Copy the full SHA
    7a4682c View commit details
    Browse the repository at this point in the history
  2. 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.
    wearhere committed Sep 19, 2019
    Configuration menu
    Copy the full SHA
    5caea0c View commit details
    Browse the repository at this point in the history