axon transport for bunyan logs
Axon transport for raw bunyan streams
Still WIP but "works on my machine certified". Open to pull requests and suggestions
Uses axon (2) pub/sub sockets as transport for bunyan log messages.
For examples of use with a recieving server see
There are some warts with this approach such as a race condition between first log events coming through and server binding because we're using pub/sub sockets and events are not queued. maybe we should emit an event or somesuch when connected, or switch to push/pull sockets but somehow make sure every connected 'thing' gets each message.
Deep down there is also something fundamentally wrong with doing sending logging data across a network from inside an application, it's much more sane for this to be used by something thats wraps the application. (But don't let that stop you from doing what you want)
npm install bunyan-axon
var bunyan = require'bunyan';var baxon = require'../';var log = bunyancreateLoggername: "testStream"streams:level:"info" type:"raw" stream: baxonaddress:"tcp://127.0.0.1:9010"
var writeableStreamForBunyan = baxonopts;
Either a string in format accepted by axon e.g
tcp://127.0.0.1:8124 or an object in the following format
port: 8124host: '127.0.0.1'
false, if set to
true this module will bind rather than connect to the supplied address