Line data Source code
1 : #include "log.h" 2 : #include <czmq_logc.h> 3 : #include <event2/logc.h> 4 : 5 : LOG(libsentinel_minipot); 6 : 7 : __attribute__((constructor)) 8 2 : static void log_constructor() { 9 2 : log_bind(log_libsentinel_minipot, log_czmq); 10 2 : logc_czmq_init(); 11 : 12 2 : log_bind(log_libsentinel_minipot, log_event); 13 2 : logc_event_init(); 14 2 : } 15 : 16 : __attribute__((destructor)) 17 2 : static void log_destructor() { 18 2 : logc_czmq_cleanup(); 19 2 : log_unbind(log_czmq); 20 : 21 2 : logc_event_cleanup(); 22 2 : log_unbind(log_event); 23 2 : }