node-tailer tries to be the node.js equivalent of 'tail -F <file>'
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


node-tailer tries to be the node.js equivalent of 'tail -F <file>'


To install:

npm install tailer

or add tailer to package.json and run 'npm install'


Tailer = require('tailer');

tailer = new Tailer("/var/log/messages", {fromstart: true, delay: 500});

tailer.tail(function(err, line){
	//Do something with the new line in the tailed file

//When you want to stop tailing:


Currently you can supply 2 options to the Tailer constructor:

  • fromstart - Tells the tailer to read the file from the start and output all existing lines. If false (default), it will only tail new lines added to the file after the tailer has been created.
  • delay - This is the delay in ms (default 1000) between 2 consecutive reads in the file.