From ed09425a5d286f5c7cabb411fb5f1e232de7c9df Mon Sep 17 00:00:00 2001 From: Roman Arutyunyan Date: Thu, 28 Nov 2013 21:40:19 +0400 Subject: [PATCH] test debug logging --- dash/ngx_rtmp_dash_module.c | 2 +- hls/ngx_rtmp_hls_module.c | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/dash/ngx_rtmp_dash_module.c b/dash/ngx_rtmp_dash_module.c index 0ad7552..6585fbc 100644 --- a/dash/ngx_rtmp_dash_module.c +++ b/dash/ngx_rtmp_dash_module.c @@ -1261,7 +1261,7 @@ ngx_rtmp_dash_cleanup_dir(ngx_str_t *ppath, ngx_msec_t playlen) ngx_log_error(NGX_LOG_CRIT, ngx_cycle->log, err, "dash: cleanup " ngx_read_dir_n - " \"%V\" failed", ppath); + " '%V' failed", ppath); return NGX_ERROR; } diff --git a/hls/ngx_rtmp_hls_module.c b/hls/ngx_rtmp_hls_module.c index 334e46e..9bdba95 100644 --- a/hls/ngx_rtmp_hls_module.c +++ b/hls/ngx_rtmp_hls_module.c @@ -1914,11 +1914,13 @@ ngx_rtmp_hls_cleanup_dir(ngx_str_t *ppath, ngx_msec_t playlen) "hls: cleanup path='%V' playlen=%M", ppath, playlen); + ngx_log_debug1(NGX_LOG_DEBUG_RTMP, ngx_cycle->log, 0, "hls: cleanup test 1 '%s'", ppath->data); if (ngx_open_dir(ppath, &dir) != NGX_OK) { ngx_log_debug1(NGX_LOG_DEBUG_RTMP, ngx_cycle->log, ngx_errno, "hls: cleanup open dir failed '%V'", ppath); return NGX_ERROR; } + ngx_log_debug1(NGX_LOG_DEBUG_RTMP, ngx_cycle->log, 0, "hls: cleanup test 2 '%s'", ppath->data); nentries = 0; nerased = 0; @@ -1941,7 +1943,7 @@ ngx_rtmp_hls_cleanup_dir(ngx_str_t *ppath, ngx_msec_t playlen) ngx_log_error(NGX_LOG_CRIT, ngx_cycle->log, err, "hls: cleanup " ngx_read_dir_n - " \"%V\" failed", ppath); + " '%V' failed", ppath); return NGX_ERROR; } @@ -1959,7 +1961,7 @@ ngx_rtmp_hls_cleanup_dir(ngx_str_t *ppath, ngx_msec_t playlen) spath.len = p - path; nentries++; - ngx_log_debug1(NGX_LOG_DEBUG_RTMP, ngx_cycle->log, 0, "hls: cleanup test 1 '%s'", path); + ngx_log_debug1(NGX_LOG_DEBUG_RTMP, ngx_cycle->log, 0, "hls: cleanup test 3 '%s'", ppath->data); if (!dir.valid_info && ngx_de_info(path, &dir) == NGX_FILE_ERROR) { ngx_log_error(NGX_LOG_CRIT, ngx_cycle->log, ngx_errno, @@ -1968,15 +1970,12 @@ ngx_rtmp_hls_cleanup_dir(ngx_str_t *ppath, ngx_msec_t playlen) continue; } - ngx_log_debug1(NGX_LOG_DEBUG_RTMP, ngx_cycle->log, 0, "hls: cleanup test 2 '%s'", path); if (ngx_de_is_dir(&dir)) { - ngx_log_debug1(NGX_LOG_DEBUG_RTMP, ngx_cycle->log, 0, "hls: cleanup test 3 '%s'", path); if (ngx_rtmp_hls_cleanup_dir(&spath, playlen) == 0) { ngx_log_debug1(NGX_LOG_DEBUG_RTMP, ngx_cycle->log, 0, "hls: cleanup dir '%V'", &name); - ngx_log_debug1(NGX_LOG_DEBUG_RTMP, ngx_cycle->log, 0, "hls: cleanup test 4 '%s'", path); if (ngx_delete_dir(path) == NGX_FILE_ERROR) { ngx_log_error(NGX_LOG_ERR, ngx_cycle->log, ngx_errno,