aboutsummaryrefslogtreecommitdiff
path: root/src/http/modules/ngx_http_log_module.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2009-04-27 09:55:53 +0000
committerIgor Sysoev <igor@sysoev.ru>2009-04-27 09:55:53 +0000
commitf1cc457d7f562a7c8e7ff9ba28fc143bd175a7dc (patch)
treef3c4ae29d70a5dfd1f42dfe10174a7cbcbb9bdeb /src/http/modules/ngx_http_log_module.c
parent0e60e4f73a62bf168dcc0ece770dafa27de35207 (diff)
downloadnginx-f1cc457d7f562a7c8e7ff9ba28fc143bd175a7dc.tar.gz
nginx-f1cc457d7f562a7c8e7ff9ba28fc143bd175a7dc.zip
*) of.test_only to not open file if only stat() is enough
*) of.failed to return exact name of failed syscall
Diffstat (limited to 'src/http/modules/ngx_http_log_module.c')
-rw-r--r--src/http/modules/ngx_http_log_module.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/http/modules/ngx_http_log_module.c b/src/http/modules/ngx_http_log_module.c
index 93ff90568..efe720bf5 100644
--- 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_request_t *r, ngx_http_log_script_t *script,
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_request_t *r, ngx_http_log_script_t *script,
!= 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;
}