Loading src/common/log.c +7 −0 Original line number Diff line number Diff line Loading @@ -482,8 +482,11 @@ void switch_logs_debug(void) } #ifdef HAVE_EVENT_SET_LOG_CALLBACK static const char *suppress_msg = NULL; void libevent_logging_callback(int severity, const char *msg) { if (suppress_msg && strstr(msg, suppress_msg)) return; switch (severity) { case _EVENT_LOG_DEBUG: log(LOG_DEBUG, "Message from libevent: %s", msg); Loading @@ -506,6 +509,10 @@ void configure_libevent_logging(void) { event_set_log_callback(libevent_logging_callback); } void suppress_libevent_log_msg(const char *msg) { suppress_msg = msg; } #else void configure_libevent_logging(void) {} #endif src/common/log.h +1 −0 Original line number Diff line number Diff line Loading @@ -67,6 +67,7 @@ void add_temp_log(void); void close_temp_logs(void); void mark_logs_temp(void); void configure_libevent_logging(void); void suppress_libevent_log_msg(const char *msg); /* Outputs a message to stdout */ void _log(int severity, const char *format, ...) CHECK_PRINTF(2,3); Loading src/or/config.c +2 −0 Original line number Diff line number Diff line Loading @@ -270,7 +270,9 @@ options_act(void) { } if (!libevent_initialized) { configure_libevent_logging(); suppress_libevent_logmsg("function not implemented"); event_init(); suppress_libevent_msg(NULL); #if defined(HAVE_EVENT_GET_VERSION) && defined(HAVE_EVENT_GET_METHOD) /* Making this a NOTICE for now so we can link bugs to a libevent versions * or methods better. */ Loading Loading
src/common/log.c +7 −0 Original line number Diff line number Diff line Loading @@ -482,8 +482,11 @@ void switch_logs_debug(void) } #ifdef HAVE_EVENT_SET_LOG_CALLBACK static const char *suppress_msg = NULL; void libevent_logging_callback(int severity, const char *msg) { if (suppress_msg && strstr(msg, suppress_msg)) return; switch (severity) { case _EVENT_LOG_DEBUG: log(LOG_DEBUG, "Message from libevent: %s", msg); Loading @@ -506,6 +509,10 @@ void configure_libevent_logging(void) { event_set_log_callback(libevent_logging_callback); } void suppress_libevent_log_msg(const char *msg) { suppress_msg = msg; } #else void configure_libevent_logging(void) {} #endif
src/common/log.h +1 −0 Original line number Diff line number Diff line Loading @@ -67,6 +67,7 @@ void add_temp_log(void); void close_temp_logs(void); void mark_logs_temp(void); void configure_libevent_logging(void); void suppress_libevent_log_msg(const char *msg); /* Outputs a message to stdout */ void _log(int severity, const char *format, ...) CHECK_PRINTF(2,3); Loading
src/or/config.c +2 −0 Original line number Diff line number Diff line Loading @@ -270,7 +270,9 @@ options_act(void) { } if (!libevent_initialized) { configure_libevent_logging(); suppress_libevent_logmsg("function not implemented"); event_init(); suppress_libevent_msg(NULL); #if defined(HAVE_EVENT_GET_VERSION) && defined(HAVE_EVENT_GET_METHOD) /* Making this a NOTICE for now so we can link bugs to a libevent versions * or methods better. */ Loading