0

fs.watch('log-file', function(event, filename) {}); only returns the file name that was changed.

Is it possible to only get what was actually changed? I don't want to read the entire file, and rather want to know what was modified from my file (in my case, there is always addition to a log file. nothing ever gets erased).

Kousha
  • 32,871
  • 51
  • 172
  • 296

1 Answers1

0

It seems that you are looking to solve a similar problem to How to do `tail -f logfile.txt`-like processing in node.js?

As per the first response I would look into the the node-tail module.

Community
  • 1
  • 1