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 tailoptions
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 tofs.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
: simulatetail -F
option. In the case the file is moved/renamed (or logrotated) if set totrue
tail
will try to start tailing again after a 1 second delay, if set tofalse
it will just emit an error event (default:true
)