]> granicus.if.org Git - php/commitdiff
Fixed Bug #68478 acess_log don't use prefix
authorRemi Collet <remi@php.net>
Sat, 22 Nov 2014 09:25:53 +0000 (10:25 +0100)
committerRemi Collet <remi@php.net>
Sat, 22 Nov 2014 09:25:53 +0000 (10:25 +0100)
Calling fpm_conf_process_all_pools before fpm_log_open
allow to use fpm_evaluate_full_path and so to honor
global prefix or pool prefix for access.log

sapi/fpm/fpm/fpm_conf.c
sapi/fpm/fpm/fpm_log.c
sapi/fpm/php-fpm.conf.in

index dab4c8bf6b1e1e3d06a778aaeb403dcc80ee0707..1f73bc915c930d16c1a4f4048d7b41dcbf2b0eb6 100644 (file)
@@ -1200,15 +1200,15 @@ static int fpm_conf_post_process(int force_daemon TSRMLS_DC) /* {{{ */
                return -1;
        }
 
-       if (0 > fpm_log_open(0)) {
+       if (0 > fpm_event_pre_init(fpm_global_config.events_mechanism)) {
                return -1;
        }
 
-       if (0 > fpm_event_pre_init(fpm_global_config.events_mechanism)) {
+       if (0 > fpm_conf_process_all_pools()) {
                return -1;
        }
 
-       if (0 > fpm_conf_process_all_pools()) {
+       if (0 > fpm_log_open(0)) {
                return -1;
        }
 
index c71281b0b975978188a04a127a053214ec58a5e4..b0bf32ac16589250a3ad743a62d5d36e339a04be 100644 (file)
@@ -46,6 +46,8 @@ int fpm_log_open(int reopen) /* {{{ */
                if (0 > fd) {
                        zlog(ZLOG_SYSERROR, "failed to open access log (%s)", wp->config->access_log);
                        return -1;
+               } else {
+                       zlog(ZLOG_DEBUG, "open access log (%s)", wp->config->access_log);
                }
 
                if (reopen) {
index 2b1566047f5d4f7226215df55285706d93108fd7..833a4f4f8c1277b2f3283565dd96d0857833257d 100644 (file)
 
 ; Per pool prefix
 ; It only applies on the following directives:
+; - 'access.log'
 ; - 'slowlog'
 ; - 'listen' (unixsocket)
 ; - 'chroot'