eel-stream is superceded by eel >= 0.1.x

Send eel logs to a writable stream

npm install eel-stream
1 downloads in the last week
1 downloads in the last month

eel-stream - EventEmitter logging -> writeable streams Build Status

An incredibly simple module, just 6 lines:

module.exports = function (formatter, stream) {
    return function (entry) {
        var output = formatter(entry)
        if (!output) return
        stream.write(output + '\n')


Install it like this:

npm install eel-stream

Use it like this:

fs  = require('fs')
log = require('eel')

log.on('entry', require('eel-stream')(JSON.stringify, fs.createWriteStream(__dirname+'/myapp.log')))

log('test1', {ok: true})
log('test2', {ok: false})

And get log entries like this:



  • formatter: A callback with the signature (entry) -> String|Buffer
  • stream: A writable stream



npm loves you