From 18f91db0c34cc2a2dc54286baa65a508e9508f31 Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Wed, 17 Jun 2020 06:01:18 +0000 Subject: [PATCH] make it possible to log all messages, including 'TRACE' level, even when we have called suspend_nonfatal_logging git-svn-id: https://xpra.org/svn/Xpra/trunk@26750 3bb7dfac-3a0b-4e04-842a-767bc560f471 --- src/xpra/codecs/libav_common/av_log.pyx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/xpra/codecs/libav_common/av_log.pyx b/src/xpra/codecs/libav_common/av_log.pyx index 5835a70d6f..d2bbaf8123 100644 --- a/src/xpra/codecs/libav_common/av_log.pyx +++ b/src/xpra/codecs/libav_common/av_log.pyx @@ -7,9 +7,11 @@ from xpra.os_util import bytestostr from xpra.util import nonl -from xpra.log import Logger +from xpra.log import Logger, is_debug_enabled log = Logger("libav") +LIBAV_DEBUG = is_debug_enabled("libav") + cdef extern from "libavutil/error.h": int av_strerror(int errnum, char *errbuf, size_t errbuf_size) @@ -74,6 +76,8 @@ cdef void log_callback_override(void *avcl, int level, const char *fmt, va_list elif level<=DEBUG_LEVEL: l = log.debug else: + if LIBAV_DEBUG: + l = log.debug #don't bother return #turn it into a string: