diff options
Diffstat (limited to 'src/common/log.c')
-rw-r--r-- | src/common/log.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/common/log.c b/src/common/log.c index 94a683fb96..6b1a1a5c03 100644 --- a/src/common/log.c +++ b/src/common/log.c @@ -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); @@ -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 |