use %*s format
diff --git a/src/core/ngx_resolver.c b/src/core/ngx_resolver.c
index be0121e..ef2c92b 100644
--- a/src/core/ngx_resolver.c
+++ b/src/core/ngx_resolver.c
@@ -669,17 +669,8 @@
return;
}
-#if (NGX_DEBUG)
- {
- ngx_str_t s;
-
- s.len = rn->nlen;
- s.data = rn->name;
-
- ngx_log_debug1(NGX_LOG_DEBUG_CORE, r->log, 0,
- "resolver expire \"%V\"", &s);
- }
-#endif
+ ngx_log_debug2(NGX_LOG_DEBUG_CORE, r->log, 0,
+ "resolver expire \"%*s\"", (size_t) rn->nlen, rn->name);
ngx_queue_remove(q);
@@ -783,17 +774,9 @@
return rn->expire - now;
}
-#if (NGX_DEBUG)
- {
- ngx_str_t s;
-
- s.len = rn->nlen;
- s.data = rn->name;
-
- ngx_log_debug2(NGX_LOG_DEBUG_CORE, r->log, 0,
- "resolver resend \"%V\" %p", &s, rn->waiting);
- }
-#endif
+ ngx_log_debug3(NGX_LOG_DEBUG_CORE, r->log, 0,
+ "resolver resend \"%*s\" %p",
+ (size_t) rn->nlen, rn->name, rn->waiting);
ngx_queue_remove(q);
diff --git a/src/http/modules/ngx_http_proxy_module.c b/src/http/modules/ngx_http_proxy_module.c
index ec31673..0849668 100644
--- a/src/http/modules/ngx_http_proxy_module.c
+++ b/src/http/modules/ngx_http_proxy_module.c
@@ -880,16 +880,9 @@
b->last = e.pos;
}
-#if (NGX_DEBUG)
- {
- ngx_str_t s;
-
- s.len = b->last - b->pos;
- s.data = b->pos;
- ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
- "http proxy header:\n\"%V\"", &s);
- }
-#endif
+ ngx_log_debug2(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
+ "http proxy header:\n\"%*s\"",
+ (size_t) (b->last - b->pos), b->pos);
if (plcf->body_set == NULL && plcf->upstream.pass_request_body) {
diff --git a/src/http/ngx_http_copy_filter_module.c b/src/http/ngx_http_copy_filter_module.c
index 3069779..3b1a3a7 100644
--- a/src/http/ngx_http_copy_filter_module.c
+++ b/src/http/ngx_http_copy_filter_module.c
@@ -121,11 +121,8 @@
r->out = ctx->in;
}
-#if (NGX_DEBUG)
ngx_log_debug3(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
"copy filter: %i \"%V?%V\"", rc, &r->uri, &r->args);
-#endif
-
}
return rc;
diff --git a/src/http/ngx_http_header_filter_module.c b/src/http/ngx_http_header_filter_module.c
index 63ecfa1..6e80f09 100644
--- a/src/http/ngx_http_header_filter_module.c
+++ b/src/http/ngx_http_header_filter_module.c
@@ -521,10 +521,8 @@
*b->last++ = CR; *b->last++ = LF;
}
-#if (NGX_DEBUG)
- *b->last = '\0';
- ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, "%s\n", b->pos);
-#endif
+ ngx_log_debug2(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
+ "%*s\n", (size_t) (b->last - b->pos), b->pos);
/* the end of HTTP header */
*b->last++ = CR; *b->last++ = LF;