Skip to content

Release 1.0.0

Choose a tag to compare

@lucagrulla lucagrulla released this 19 Mar 15:30
· 187 commits to master since this release

v1.0.0 includes breaking changes.

Tail constructor now takes a mandatory file name and an optional map with extra optional parameters.

available options:

  • fileToTail is the name (inclusive of the path) of the file to tail
  • options is a hash. The following keys are accepted:
    • lineSeparator: the line separator token (default /[\r]{0,1}\n/ to handle linux/mac (9+)/windows)
    • watchOptions: the full set of options that can be passed to fs.watch as per node documentation (default: {})
    • fromBeginning: forces the tail of the file from the very beginning of it instead of from the first new line that will be appended (default: false)
    • follow: simulate tail -F option. In the case the file is moved/renamed (or logrotated) if set to true tail will try to start tailing again after a 1 second delay, if set to false it will just emit an error event (default: true)