basho/riaknostic — pull request #70 by engelsanchez (2013-06-24 19:18:29+00:00)
Title: Restore riaknostic output to console

When riaknostic became part of Riak instead of a separate app, its
output (through lager) ended up in the node's console.log instead of
being output by 'riak-admin diag'. Among other things, this broke the
riaknostic_rt riak test. This adds a layer on top of lager, so messages
can be directed to the console again, simply by using io:format. This
way, messages are sent to the group_leader instead of the user process,
which is what the lager backend does. When riaknostic is invoked through
RPC by riak-admin, the caller becomes the group leader and picks up
those messages. I wish there was a cleaner way to do this leveraging
something in lager, but I couldn't find any.

Disclosure: Blame @bsparrow435 for being on vacation when this came up :)