From fa3fe7a9022f091229ddf9703f631512439fafcf Mon Sep 17 00:00:00 2001 From: chronolaw Date: Tue, 23 May 2023 15:45:37 +0800 Subject: [PATCH] debug log --- src/ngx_lua_resty_lmdb_module.c | 2 ++ t/10-validation-tag-plain.t | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ngx_lua_resty_lmdb_module.c b/src/ngx_lua_resty_lmdb_module.c index 96d8bf1e..0f56b370 100644 --- a/src/ngx_lua_resty_lmdb_module.c +++ b/src/ngx_lua_resty_lmdb_module.c @@ -562,6 +562,8 @@ ngx_lua_resty_lmdb_validate(ngx_cycle_t *cycle, /* check tag value in lmdb */ if (lcf->validation_tag.data == NULL) { + ngx_log_debug0(NGX_LOG_DEBUG_CORE, cycle->log, 0, + "LMDB validation disabled"); return NGX_OK; } diff --git a/t/10-validation-tag-plain.t b/t/10-validation-tag-plain.t index 13f6be96..45a7b23b 100644 --- a/t/10-validation-tag-plain.t +++ b/t/10-validation-tag-plain.t @@ -7,7 +7,7 @@ use Cwd qw(cwd); repeat_each(1); -plan tests => repeat_each() * blocks() * 5 + 2; +plan tests => repeat_each() * blocks() * 6; my $pwd = cwd(); @@ -65,6 +65,8 @@ true value nil nil +--- error_log +LMDB validation disabled --- no_error_log [error] [warn]