variables in access_log
diff --git a/src/core/ngx_open_file_cache.c b/src/core/ngx_open_file_cache.c
index bf8f0de..704d0ab 100644
--- a/src/core/ngx_open_file_cache.c
+++ b/src/core/ngx_open_file_cache.c
@@ -460,7 +460,14 @@
}
}
- fd = ngx_open_file(name, NGX_FILE_RDONLY, NGX_FILE_OPEN, 0);
+ if (!of->log) {
+ fd = ngx_open_file(name, NGX_FILE_RDONLY, NGX_FILE_OPEN, 0);
+
+ } else {
+ fd = ngx_open_file(name, NGX_FILE_RDWR,
+ NGX_FILE_CREATE_OR_OPEN|NGX_FILE_APPEND,
+ NGX_FILE_DEFAULT_ACCESS);
+ }
if (fd == NGX_INVALID_FILE) {
goto failed;
diff --git a/src/core/ngx_open_file_cache.h b/src/core/ngx_open_file_cache.h
index dd294e7..4d8393b 100644
--- a/src/core/ngx_open_file_cache.h
+++ b/src/core/ngx_open_file_cache.h
@@ -24,6 +24,7 @@
ngx_uint_t min_uses;
unsigned test_dir:1;
+ unsigned log:1;
unsigned errors:1;
unsigned events:1;