changeset 2077:479440385e35

fix error message
author Igor Sysoev <igor@sysoev.ru>
date Mon, 30 Jun 2008 15:32:57 +0000
parents 5771776acf3c
children 9acbc5e7bcbd
files src/http/modules/ngx_http_log_module.c src/http/ngx_http_request.c
diffstat 2 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/http/modules/ngx_http_log_module.c
+++ b/src/http/modules/ngx_http_log_module.c
@@ -422,7 +422,8 @@ ngx_http_log_script_write(ngx_http_reque
     {
         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,
--- a/src/http/ngx_http_request.c
+++ b/src/http/ngx_http_request.c
@@ -2623,6 +2623,8 @@ ngx_http_request_done(ngx_http_request_t
         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 @@ ngx_http_request_done(ngx_http_request_t
         log_handler[i](r);
     }
 
+    log->action = "closing request";
+
     if (r->connection->timedout) {
         clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module);