Mercurial > hg > nginx
diff src/http/ngx_http_event.c @ 119:cd54bcbaf3b5
nginx-0.0.1-2003-07-21-01:15:59 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Sun, 20 Jul 2003 21:15:59 +0000 |
parents | ac69ab96328d |
children | e29909bd9b8a |
line wrap: on
line diff
--- a/src/http/ngx_http_event.c Fri Jul 18 14:44:05 2003 +0000 +++ b/src/http/ngx_http_event.c Sun Jul 20 21:15:59 2003 +0000 @@ -65,7 +65,7 @@ { int event; ngx_event_t *rev; - ngx_http_log_ctx_t *lcx; + ngx_http_log_ctx_t *lctx; c->addr_text.data = ngx_palloc(c->pool, c->listening->addr_text_max_len); if (c->addr_text.data == NULL) { @@ -81,15 +81,15 @@ return; } - lcx = ngx_pcalloc(c->pool, sizeof(ngx_http_log_ctx_t)); - if (lcx == NULL) { + lctx = ngx_pcalloc(c->pool, sizeof(ngx_http_log_ctx_t)); + if (lctx == NULL) { ngx_http_close_connection(c); return; } - lcx->client = c->addr_text.data; - lcx->action = "reading client request line"; - c->log->data = lcx; + lctx->client = c->addr_text.data; + lctx->action = "reading client request line"; + c->log->data = lctx; c->log->handler = ngx_http_log_error; rev = c->read; @@ -136,6 +136,7 @@ ngx_http_in_addr_t *in_addr; ngx_http_server_name_t *server_name; ngx_http_core_srv_conf_t *cscf; + ngx_http_core_loc_conf_t *clcf; c = rev->data; @@ -212,6 +213,10 @@ server_name = cscf->server_names.elts; r->server_name = &server_name->name; + clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module); + c->log->file = clcf->err_log->file; + c->log->log_level = clcf->err_log->log_level; + if (c->buffer == NULL) { c->buffer = ngx_create_temp_hunk(c->pool, cscf->client_header_buffer_size, @@ -265,7 +270,7 @@ ssize_t n; ngx_connection_t *c; ngx_http_request_t *r; - ngx_http_log_ctx_t *lcx; + ngx_http_log_ctx_t *lctx; ngx_http_core_srv_conf_t *cscf; c = rev->data; @@ -421,9 +426,9 @@ return; } - lcx = c->log->data; - lcx->action = "reading client request headers"; - lcx->url = r->unparsed_uri.data; + lctx = c->log->data; + lctx->action = "reading client request headers"; + lctx->url = r->unparsed_uri.data; r->headers_in.headers = ngx_create_table(r->pool, 10); if (cscf->large_client_header @@ -505,6 +510,7 @@ ngx_http_request_t *r; ngx_http_server_name_t *name; ngx_http_core_srv_conf_t *cscf; + ngx_http_core_loc_conf_t *clcf; c = rev->data; r = c->data; @@ -619,6 +625,12 @@ { r->srv_conf = name[i].core_srv_conf->ctx->srv_conf; r->loc_conf = name[i].core_srv_conf->ctx->loc_conf; + + clcf = ngx_http_get_module_loc_conf(r, + ngx_http_core_module); + c->log->file = clcf->err_log->file; + c->log->log_level = clcf->err_log->log_level; + break; } }