summaryrefslogtreecommitdiffhomepage
path: root/src/http
diff options
context:
space:
mode:
Diffstat (limited to 'src/http')
-rw-r--r--src/http/ngx_http_core_module.c28
-rw-r--r--src/http/ngx_http_request.h1
2 files changed, 2 insertions, 27 deletions
diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c
index 4403fa308..b32a8842c 100644
--- a/src/http/ngx_http_core_module.c
+++ b/src/http/ngx_http_core_module.c
@@ -4888,33 +4888,7 @@ ngx_http_core_error_log(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
{
ngx_http_core_loc_conf_t *clcf = conf;
- ngx_str_t *value, name;
-
- if (clcf->error_log) {
- return "is duplicate";
- }
-
- value = cf->args->elts;
-
- if (ngx_strcmp(value[1].data, "stderr") == 0) {
- ngx_str_null(&name);
- cf->cycle->log_use_stderr = 1;
-
- } else {
- name = value[1];
- }
-
- clcf->error_log = ngx_log_create(cf->cycle, &name);
- if (clcf->error_log == NULL) {
- return NGX_CONF_ERROR;
- }
-
- if (cf->args->nelts == 2) {
- clcf->error_log->log_level = NGX_LOG_ERR;
- return NGX_CONF_OK;
- }
-
- return ngx_log_set_levels(cf, clcf->error_log);
+ return ngx_log_set_log(cf, &clcf->error_log);
}
diff --git a/src/http/ngx_http_request.h b/src/http/ngx_http_request.h
index 1babeb2b0..3b0858ace 100644
--- a/src/http/ngx_http_request.h
+++ b/src/http/ngx_http_request.h
@@ -585,6 +585,7 @@ extern ngx_http_header_out_t ngx_http_headers_out[];
#define ngx_http_set_connection_log(c, l) \
\
c->log->file = l->file; \
+ c->log->next = l->next; \
if (!(c->log->log_level & NGX_LOG_DEBUG_CONNECTION)) { \
c->log->log_level = l->log_level; \
}