Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Node file watcher
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
example
lib
nbproject
.gitignore
.npmignore
README.md
index.js
package.json

README.md

Install

With NPM

npm install tailf

From sources

git clone https://github.com/exos/node-tailf.git tailf

Specific version

If you want install an specific version you can see the tags section: https://github.com/exos/node-tailf/tags. The new features has code in a own branch, you see the actual branches and pull it. (if you clone the repo).

Watch a file changes and return a buffer with the new added data, for watch logs, etc.

var tailf = require('tailf');

var watchinglog = new tailf.simpleTailf('my.log');

watchinglog.on('data', function (data) {
    console.log('Data arrived: ' , data.toString());
});

blockTailf

Watching file and emit data splited by a string or regular expresion.

Usage:

var tailf = require('tailf');

// emit a data event for once line
var watchinglog = new tailf.blockTailf('my.log',/\n/);

watchinglog.on('data', function (data) {
    console.log('Data arrived: ' , data);
});
Something went wrong with that request. Please try again.