0.7.4 access_log fixe
Igor Sysoev
is at rambler-co.ru
Mon Jun 30 20:03:25 MSD 2008
Исправление для 0.7.4.
--
Igor Sysoev
http://sysoev.ru/en/
-------------- next part --------------
Index: src/http/ngx_http_request.c
===================================================================
--- src/http/ngx_http_request.c (revision 1396)
+++ src/http/ngx_http_request.c (revision 1398)
@@ -2623,6 +2623,8 @@
r->headers_out.status = error;
}
+ log->action = "logging request";
+
cmcf = ngx_http_get_module_main_conf(r, ngx_http_core_module);
log_handler = cmcf->phases[NGX_HTTP_LOG_PHASE].handlers.elts;
@@ -2631,6 +2633,8 @@
log_handler[i](r);
}
+ log->action = "closing request";
+
if (r->connection->timedout) {
clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module);
Index: src/http/modules/ngx_http_log_module.c
===================================================================
--- src/http/modules/ngx_http_log_module.c (revision 1396)
+++ src/http/modules/ngx_http_log_module.c (revision 1398)
@@ -422,7 +422,8 @@
{
ngx_log_error(NGX_LOG_CRIT, r->connection->log, ngx_errno,
ngx_open_file_n " \"%s\" failed", log.data);
- return -1;
+ /* simulate successfull logging */
+ return len;
}
ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
@@ -760,7 +761,8 @@
return NGX_CONF_OK;
}
- *conf = *prev;
+ conf->logs = prev->logs;
+ conf->off = prev->off;
if (conf->logs || conf->off) {
return NGX_CONF_OK;
More information about the nginx-ru
mailing list