diff options
author | Igor Sysoev <igor@sysoev.ru> | 2007-12-24 17:05:31 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2007-12-24 17:05:31 +0000 |
commit | d02661a96bfdd036763ec24cac95b328ec234727 (patch) | |
tree | ac8ab4f3b70671829502249c3a1a0dd002869f77 /src | |
parent | 79d9a042a2dbd0732ddf9b17fdc01e68195510fc (diff) | |
download | nginx-d02661a96bfdd036763ec24cac95b328ec234727.tar.gz nginx-d02661a96bfdd036763ec24cac95b328ec234727.zip |
use %*s format
Diffstat (limited to 'src')
-rw-r--r-- | src/core/ngx_resolver.c | 27 | ||||
-rw-r--r-- | src/http/modules/ngx_http_proxy_module.c | 13 | ||||
-rw-r--r-- | src/http/ngx_http_copy_filter_module.c | 3 | ||||
-rw-r--r-- | src/http/ngx_http_header_filter_module.c | 6 |
4 files changed, 10 insertions, 39 deletions
diff --git a/src/core/ngx_resolver.c b/src/core/ngx_resolver.c index be0121e2e..ef2c92ba4 100644 --- a/src/core/ngx_resolver.c +++ b/src/core/ngx_resolver.c @@ -669,17 +669,8 @@ ngx_resolver_expire(ngx_resolver_t *r, ngx_rbtree_t *tree, ngx_queue_t *queue) 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 @@ ngx_resolver_resend(ngx_resolver_t *r, ngx_rbtree_t *tree, ngx_queue_t *queue) 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 ec31673ad..0849668ee 100644 --- a/src/http/modules/ngx_http_proxy_module.c +++ b/src/http/modules/ngx_http_proxy_module.c @@ -880,16 +880,9 @@ ngx_http_proxy_create_request(ngx_http_request_t *r) 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 3069779c2..3b1a3a730 100644 --- a/src/http/ngx_http_copy_filter_module.c +++ b/src/http/ngx_http_copy_filter_module.c @@ -121,11 +121,8 @@ ngx_http_copy_filter(ngx_http_request_t *r, ngx_chain_t *in) 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 63ecfa135..6e80f090a 100644 --- a/src/http/ngx_http_header_filter_module.c +++ b/src/http/ngx_http_header_filter_module.c @@ -521,10 +521,8 @@ ngx_http_header_filter(ngx_http_request_t *r) *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; |