tailf

0.2.3 • Public • Published

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

var tailf = require('node-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('node-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);
});

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.2.3
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.2.3
    1
  • 0.1.3
    0
  • 0.1.2
    0
  • 0.1.1
    0
  • 0.1.0
    0

Package Sidebar

Install

npm i tailf

Weekly Downloads

1

Version

0.2.3

License

none

Last publish

Collaborators

  • exos