jordansissel / ruby-cabin

Structured+contextual logging experiments in Ruby
Other
153 stars 22 forks source link

ZeroMQ output #7

Closed grantr closed 12 years ago

grantr commented 12 years ago

This branch adds a zeromq output for Cabin.

The socket can be connected to multiple addresses by passing an array as the first argument.

Users can configure topology (pushpull or pubsub), HWM, LINGER, and pubsub topic as options in initialize.

Topic can be a proc in which case it is called for every message with the event as argument.

The output uses a per-instance at_exit hook to ensure sockets are closed. I don't know the gotchas for at_exit hooks, but probably best to avoid creating a lot of these until Cabin has graceful teardown support.

grantr commented 12 years ago

Btw i can axe the Gemfile commit if you want.