diff src/http/modules/ngx_http_log_module.c @ 2756:09cab3f8d92e

*) of.test_only to not open file if only stat() is enough *) of.failed to return exact name of failed syscall
author Igor Sysoev <igor@sysoev.ru>
date Mon, 27 Apr 2009 09:55:53 +0000
parents a6d6d762c554
children c7d57b539248
line wrap: on
line diff
--- a/src/http/modules/ngx_http_log_module.c
+++ b/src/http/modules/ngx_http_log_module.c
@@ -385,6 +385,8 @@ ngx_http_log_script_write(ngx_http_reque
 
         of.valid = clcf->open_file_cache_valid;
         of.min_uses = clcf->open_file_cache_min_uses;
+        of.test_dir = 1;
+        of.test_only = 1;
         of.errors = clcf->open_file_cache_errors;
         of.events = clcf->open_file_cache_events;
 
@@ -439,7 +441,7 @@ ngx_http_log_script_write(ngx_http_reque
         != NGX_OK)
     {
         ngx_log_error(NGX_LOG_CRIT, r->connection->log, ngx_errno,
-                      ngx_open_file_n " \"%s\" failed", log.data);
+                      "%s \"%s\" failed", of.failed, log.data);
         /* simulate successfull logging */
         return len;
     }