comparison src/http/ngx_http_request.c @ 2785:d478379e51ac

*) refactor error_log processing: listen socket log might inherit built-in error_log with zero level, and r2447, r2466, r2467 were not enough *) remove bogus "stderr" level *) some functions and fields renames
author Igor Sysoev <igor@sysoev.ru>
date Thu, 30 Apr 2009 13:53:42 +0000
parents e50a2faac31d
children 43fe53832da7
comparison
equal deleted inserted replaced
2784:c2230102df6f 2785:d478379e51ac
418 } 418 }
419 419
420 #endif 420 #endif
421 421
422 clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module); 422 clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module);
423 c->log->file = clcf->err_log->file; 423 c->log->file = clcf->error_log->file;
424 if (!(c->log->log_level & NGX_LOG_DEBUG_CONNECTION)) { 424 if (!(c->log->log_level & NGX_LOG_DEBUG_CONNECTION)) {
425 c->log->log_level = clcf->err_log->log_level; 425 c->log->log_level = clcf->error_log->log_level;
426 } 426 }
427 427
428 if (c->buffer == NULL) { 428 if (c->buffer == NULL) {
429 c->buffer = ngx_create_temp_buf(c->pool, 429 c->buffer = ngx_create_temp_buf(c->pool,
430 cscf->client_header_buffer_size); 430 cscf->client_header_buffer_size);
1702 1702
1703 r->srv_conf = cscf->ctx->srv_conf; 1703 r->srv_conf = cscf->ctx->srv_conf;
1704 r->loc_conf = cscf->ctx->loc_conf; 1704 r->loc_conf = cscf->ctx->loc_conf;
1705 1705
1706 clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module); 1706 clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module);
1707 r->connection->log->file = clcf->err_log->file; 1707 r->connection->log->file = clcf->error_log->file;
1708 1708
1709 if (!(r->connection->log->log_level & NGX_LOG_DEBUG_CONNECTION)) { 1709 if (!(r->connection->log->log_level & NGX_LOG_DEBUG_CONNECTION)) {
1710 r->connection->log->log_level = clcf->err_log->log_level; 1710 r->connection->log->log_level = clcf->error_log->log_level;
1711 } 1711 }
1712 1712
1713 return NGX_OK; 1713 return NGX_OK;
1714 } 1714 }
1715 1715