diff options
author | Igor Sysoev <igor@sysoev.ru> | 2009-01-16 14:00:05 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2009-01-16 14:00:05 +0000 |
commit | 91cf00da1787ea1386dba82112fa9b1a0511eff2 (patch) | |
tree | 3b0c4f7a2722edf90536322a1477044c57801653 | |
parent | 6019a7621b11f587fd18e1f9823e2438a7e14686 (diff) | |
download | nginx-91cf00da1787ea1386dba82112fa9b1a0511eff2.tar.gz nginx-91cf00da1787ea1386dba82112fa9b1a0511eff2.zip |
set the error level as default http error_log level
-rw-r--r-- | src/core/ngx_cycle.c | 4 | ||||
-rw-r--r-- | src/core/ngx_log.c | 5 |
2 files changed, 4 insertions, 5 deletions
diff --git a/src/core/ngx_cycle.c b/src/core/ngx_cycle.c index aa0d9ce7e..cdebf5645 100644 --- a/src/core/ngx_cycle.c +++ b/src/core/ngx_cycle.c @@ -394,10 +394,6 @@ ngx_init_cycle(ngx_cycle_t *old_cycle) cycle->log = cycle->new_log; pool->log = cycle->new_log; - if (cycle->log->log_level == 0) { - cycle->log->log_level = NGX_LOG_ERR; - } - /* create shared memory */ diff --git a/src/core/ngx_log.c b/src/core/ngx_log.c index cc38b02da..a9221db6e 100644 --- a/src/core/ngx_log.c +++ b/src/core/ngx_log.c @@ -302,7 +302,10 @@ ngx_set_error_log_levels(ngx_conf_t *cf, ngx_log_t *log) } } - if (log->log_level == NGX_LOG_DEBUG) { + if (log->log_level == 0) { + log->log_level = NGX_LOG_ERR; + + } else if (log->log_level == NGX_LOG_DEBUG) { log->log_level = NGX_LOG_DEBUG_ALL; } |