[zeromq-dev] coding note: redirecting libzmq/czmq library logging

Michael Haberler mail17 at mah.priv.at
Thu Feb 13 20:52:47 CET 2014


the libraries write assertion errors to stderr (eg libzmq/src/err.hpp) or stdout for debugging (e.g. zclock_log())

that's a tad annoying in a daemon setup where you'd want to have that output go to syslog instead of a terminal

I found this neat trick, which enables redirection of FILE * operations (NB: not fd's like used with open/close/read/write):

   http://mischasan.wordpress.com/2011/05/25/redirecting-stderr-to-syslog/

with this it's easy to redirect log output for libzmq and czmq.

- Michael





More information about the zeromq-dev mailing list