Mercurial > hg > nginx
comparison src/core/ngx_log.c @ 5250:3bb51e5afa9e
Core: moved initialization of log level.
The cycle->new_log->log_level should only be initialized by ngx_init_cycle()
if no error logs were found in the configuration. This move allows to get rid
of extra initialization in ngx_error_log().
author | Vladimir Homutov <vl@nginx.com> |
---|---|
date | Thu, 13 Jun 2013 14:50:10 +0400 |
parents | d8af1005e886 |
children | 7ecaa9e4bf1b |
comparison
equal
deleted
inserted
replaced
5249:725fb71ab1a6 | 5250:3bb51e5afa9e |
---|---|
452 if (cf->args->nelts == 2) { | 452 if (cf->args->nelts == 2) { |
453 cf->cycle->new_log.log_level = NGX_LOG_ERR; | 453 cf->cycle->new_log.log_level = NGX_LOG_ERR; |
454 return NGX_CONF_OK; | 454 return NGX_CONF_OK; |
455 } | 455 } |
456 | 456 |
457 cf->cycle->new_log.log_level = 0; | |
458 | |
459 return ngx_log_set_levels(cf, &cf->cycle->new_log); | 457 return ngx_log_set_levels(cf, &cf->cycle->new_log); |
460 } | 458 } |