]> git.kaiwu.me - nginx.git/commitdiff
fix error message
authorIgor Sysoev <igor@sysoev.ru>
Mon, 30 Jun 2008 15:32:57 +0000 (15:32 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Mon, 30 Jun 2008 15:32:57 +0000 (15:32 +0000)
src/http/modules/ngx_http_log_module.c
src/http/ngx_http_request.c

index b2a23dd70e4a90ae5ff0a10242533ffbfc08d66a..f4eefdeafaff0868ed657dc9e20f759a83cb2239 100644 (file)
@@ -422,7 +422,8 @@ ngx_http_log_script_write(ngx_http_request_t *r, ngx_http_log_script_t *script,
     {
         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,
index d707e33be991447ddee5d505898e5fc74ebc23c0..8dc562f28b229540d9bb4f25a8d41686e9ca59a3 100644 (file)
@@ -2623,6 +2623,8 @@ ngx_http_request_done(ngx_http_request_t *r, ngx_int_t error)
         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 *r, ngx_int_t error)
         log_handler[i](r);
     }
 
+    log->action = "closing request";
+
     if (r->connection->timedout) {
         clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module);