Mercurial > hg > nginx
changeset 1774:68d21fd1dc64
use %*s format
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Mon, 24 Dec 2007 17:05:31 +0000 |
parents | d85879105d35 |
children | 108576aef610 |
files | src/core/ngx_resolver.c src/http/modules/ngx_http_proxy_module.c src/http/ngx_http_copy_filter_module.c src/http/ngx_http_header_filter_module.c |
diffstat | 4 files changed, 10 insertions(+), 39 deletions(-) [+] |
line wrap: on
line diff
--- a/src/core/ngx_resolver.c Mon Dec 24 17:05:16 2007 +0000 +++ b/src/core/ngx_resolver.c Mon Dec 24 17:05:31 2007 +0000 @@ -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);
--- a/src/http/modules/ngx_http_proxy_module.c Mon Dec 24 17:05:16 2007 +0000 +++ b/src/http/modules/ngx_http_proxy_module.c Mon Dec 24 17:05:31 2007 +0000 @@ -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) {
--- a/src/http/ngx_http_copy_filter_module.c Mon Dec 24 17:05:16 2007 +0000 +++ b/src/http/ngx_http_copy_filter_module.c Mon Dec 24 17:05:31 2007 +0000 @@ -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;
--- a/src/http/ngx_http_header_filter_module.c Mon Dec 24 17:05:16 2007 +0000 +++ b/src/http/ngx_http_header_filter_module.c Mon Dec 24 17:05:31 2007 +0000 @@ -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;