diff options
author | Igor Sysoev <igor@sysoev.ru> | 2008-08-05 19:19:21 +0400 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2008-08-05 19:19:21 +0400 |
commit | 2278ea09b6271927ff8dbf9e81ed77d5c30687af (patch) | |
tree | 98c4abba1c617fae5dcdb73571ad6c0f53881b16 /src/core/ngx_hash.c | |
parent | 4ea51081b3848dee980a45eefd81986dd2499aba (diff) |
update debug logging
Diffstat (limited to 'src/core/ngx_hash.c')
-rw-r--r-- | src/core/ngx_hash.c | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/src/core/ngx_hash.c b/src/core/ngx_hash.c index 98c4460ad..023a4e636 100644 --- 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_t key, u_char *name, size_t len) 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_t *hwc, u_char *name, size_t len) 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_t *hwc, u_char *name, size_t len) 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_t *hwc, u_char *name, size_t len) 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) { /* |