From ba23d995d1573a1b40cadda107e137b7f44c3880 Mon Sep 17 00:00:00 2001 From: Roman Arutyunyan Date: Sat, 12 Jan 2013 18:13:25 +0400 Subject: [PATCH] optimized hls av logging --- hls/ngx_rtmp_hls_module.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/hls/ngx_rtmp_hls_module.c b/hls/ngx_rtmp_hls_module.c index 9554320..f61c9bd 100644 --- a/hls/ngx_rtmp_hls_module.c +++ b/hls/ngx_rtmp_hls_module.c @@ -43,7 +43,13 @@ ngx_rtmp_hls_av_log_callback(void* avcl, int level, const char* fmt, } } - ngx_log_error_core(NGX_LOG_ERR, ngx_rtmp_hls_log, 0, "hls: av: %s", buf); + if (level <= AV_LOG_ERROR) { + ngx_log_error_core(NGX_LOG_ERR, ngx_rtmp_hls_log, 0, "hls: av: %s", + buf); + return; + } + + ngx_log_debug1(NGX_LOG_DEBUG_RTMP, ngx_rtmp_hls_log, 0, "hls: av: %s", buf); }