log-reader

read text-based log files

log-reader

reader = LogReader(filename)

Initialize a log reader given the specified filename.

reader.read(callback, depth)

Start to read the log into a stream. depth allows you to stream less than all of the log. Calls callback with err, path.

var reader = new LogReader(options.log).read();
 
return function(cb) {
    reader.read(function(errpath) {
        if (err) throw err;
        return cb(formatter(path));
    });
};