# HG changeset patch # User Igor Sysoev # Date 1217949561 0 # Node ID febb71974a35e8f1916af105f0211beea139cd4d # Parent 4f48a2765da069c41a49f27026835623885628e5 update debug logging diff --git a/src/core/ngx_hash.c b/src/core/ngx_hash.c --- a/src/core/ngx_hash.c +++ b/src/core/ngx_hash.c @@ -15,11 +15,7 @@ ngx_hash_find(ngx_hash_t *hash, ngx_uint ngx_hash_elt_t *elt; #if 0 - ngx_str_t line; - - line.len = len; - line.data = name; - ngx_log_error(NGX_LOG_ALERT, ngx_cycle->log, 0, "hf:\"%V\"", &line); + ngx_log_error(NGX_LOG_ALERT, ngx_cycle->log, 0, "hf:\"%*s\"", len, name); #endif elt = hash->buckets[key % hash->size]; @@ -59,11 +55,7 @@ ngx_hash_find_wc_head(ngx_hash_wildcard_ ngx_uint_t i, n, key; #if 0 - ngx_str_t line; - - line.len = len; - line.data = name; - ngx_log_error(NGX_LOG_ALERT, ngx_cycle->log, 0, "wch:\"%V\"", &line); + ngx_log_error(NGX_LOG_ALERT, ngx_cycle->log, 0, "wch:\"%*s\"", len, name); #endif n = len; @@ -139,11 +131,7 @@ ngx_hash_find_wc_tail(ngx_hash_wildcard_ ngx_uint_t i, key; #if 0 - ngx_str_t line; - - line.len = len; - line.data = name; - ngx_log_error(NGX_LOG_ALERT, ngx_cycle->log, 0, "wct:\"%V\"", &line); + ngx_log_error(NGX_LOG_ALERT, ngx_cycle->log, 0, "wct:\"%*s\"", len, name); #endif key = 0; @@ -166,6 +154,10 @@ ngx_hash_find_wc_tail(ngx_hash_wildcard_ value = ngx_hash_find(&hwc->hash, key, name, i); +#if 0 + ngx_log_error(NGX_LOG_ALERT, ngx_cycle->log, 0, "value:\"%p\"", value); +#endif + if (value) { /*