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().
cycle->pool = pool;
cycle->log = log;
- cycle->new_log.log_level = NGX_LOG_ERR;
cycle->old_cycle = old_cycle;
cycle->conf_prefix.len = old_cycle->conf_prefix.len;
if (cycle->new_log.file == NULL) {
goto failed;
}
+
+ cycle->new_log.log_level = NGX_LOG_ERR;
}
/* open the new files */
return NGX_CONF_OK;
}
- cf->cycle->new_log.log_level = 0;
-
return ngx_log_set_levels(cf, &cf->cycle->new_log);
}