No description or website provided.
JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.babelrc
.gitignore
README.md
logstream.es5.js
logstream.es6.js
package.json

README.md

lnd-logstream

lnd log parser and streamer.

Continuously tail the lnd log files for new events.

Install

$ npm install lnd-logstream

Use

import logstream from 'lnd-logstream'

// by default, returns an RxJS event stream of [name, data] tuples
let ourBalance$ = logstream('/home/.lnd/logs/simnet/lnd.log')
    .filter(([ name, data ]) => name == 'balance')
    .map(([ name, data ]) => data.ours)

ourBalance$.subscribe(b => console.log('ourBalance', b))

// can also be used as an EventEmitter
let emitter = logstream.asEmitter('/home/.lnd/logs/simnet/lnd.log')
emitter.on('balance', data => console.log('ourBalance', d.ours))

License

https://github.com/Colu-platform/colu-nodejs/blob/master/LICENSE