Mercurial > hg > nginx
diff src/core/ngx_log.c @ 257:70e1c7d2b83d
nginx-0.0.2-2004-02-11-20:08:49 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Wed, 11 Feb 2004 17:08:49 +0000 |
parents | 2a0540287298 |
children | 5238e93961a1 |
line wrap: on
line diff
--- a/src/core/ngx_log.c Tue Feb 10 16:23:38 2004 +0000 +++ b/src/core/ngx_log.c Wed Feb 11 17:08:49 2004 +0000 @@ -42,7 +42,7 @@ }; static const char *debug_levels[] = { - "debug", "debug_core", "debug_alloc", "debug_event", "debug_http" + "debug_core", "debug_alloc", "debug_event", "debug_http" }; @@ -81,9 +81,9 @@ len += ngx_snprintf(errstr + len, max - len, PID_T_FMT "#%d: ", ngx_pid, /* STUB */ 0); - if (log->data) { + if (log->data && *(int *) log->data != -1) { len += ngx_snprintf(errstr + len, max - len, - "*%u ", * (u_int *) log->data); + "*%u ", *(u_int *) log->data); } #if (HAVE_VARIADIC_MACROS) @@ -332,7 +332,7 @@ for (i = 2; i < cf->args->nelts; i++) { - for (n = 1; n < NGX_LOG_DEBUG; n++) { + for (n = 1; n <= NGX_LOG_DEBUG; n++) { if (ngx_strcmp(value[i].data, err_levels[n]) == 0) { if (log->log_level != 0) { @@ -368,5 +368,9 @@ } } + if (log->log_level == NGX_LOG_DEBUG) { + log->log_level = NGX_LOG_DEBUG_ALL; + } + return NGX_CONF_OK; }