diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c index 0a686c33a..e684d111c 100644 --- a/src/http/ngx_http_core_module.c +++ b/src/http/ngx_http_core_module.c @@ -874,7 +874,8 @@ ngx_http_update_location_config(ngx_http_request_t *r) } if (r == r->main) { - r->connection->log->file = clcf->err_log->file; + r->connection->log->file = clcf->err_log->file; + if (!(r->connection->log->log_level & NGX_LOG_DEBUG_CONNECTION)) { r->connection->log->log_level = clcf->err_log->log_level; }