use %*s format

This commit is contained in:
Igor Sysoev 2007-12-24 17:05:31 +00:00
parent 79d9a042a2
commit d02661a96b
4 changed files with 10 additions and 39 deletions

View File

@ -669,17 +669,8 @@ ngx_resolver_expire(ngx_resolver_t *r, ngx_rbtree_t *tree, ngx_queue_t *queue)
return; return;
} }
#if (NGX_DEBUG) ngx_log_debug2(NGX_LOG_DEBUG_CORE, r->log, 0,
{ "resolver expire \"%*s\"", (size_t) rn->nlen, rn->name);
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_queue_remove(q); 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; return rn->expire - now;
} }
#if (NGX_DEBUG) ngx_log_debug3(NGX_LOG_DEBUG_CORE, r->log, 0,
{ "resolver resend \"%*s\" %p",
ngx_str_t s; (size_t) rn->nlen, rn->name, rn->waiting);
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_queue_remove(q); ngx_queue_remove(q);

View File

@ -880,16 +880,9 @@ ngx_http_proxy_create_request(ngx_http_request_t *r)
b->last = e.pos; b->last = e.pos;
} }
#if (NGX_DEBUG) ngx_log_debug2(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
{ "http proxy header:\n\"%*s\"",
ngx_str_t s; (size_t) (b->last - b->pos), b->pos);
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
if (plcf->body_set == NULL && plcf->upstream.pass_request_body) { if (plcf->body_set == NULL && plcf->upstream.pass_request_body) {

View File

@ -121,11 +121,8 @@ ngx_http_copy_filter(ngx_http_request_t *r, ngx_chain_t *in)
r->out = ctx->in; r->out = ctx->in;
} }
#if (NGX_DEBUG)
ngx_log_debug3(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, ngx_log_debug3(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
"copy filter: %i \"%V?%V\"", rc, &r->uri, &r->args); "copy filter: %i \"%V?%V\"", rc, &r->uri, &r->args);
#endif
} }
return rc; return rc;

View File

@ -521,10 +521,8 @@ ngx_http_header_filter(ngx_http_request_t *r)
*b->last++ = CR; *b->last++ = LF; *b->last++ = CR; *b->last++ = LF;
} }
#if (NGX_DEBUG) ngx_log_debug2(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
*b->last = '\0'; "%*s\n", (size_t) (b->last - b->pos), b->pos);
ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, "%s\n", b->pos);
#endif
/* the end of HTTP header */ /* the end of HTTP header */
*b->last++ = CR; *b->last++ = LF; *b->last++ = CR; *b->last++ = LF;