mirror of
https://github.com/php/php-src.git
synced 2025-08-20 09:24:05 +02:00
Fixed Bug #68478 acess_log don't use prefix
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
This commit is contained in:
parent
bc55af0cf2
commit
c50ee655ea
3 changed files with 7 additions and 4 deletions
|
@ -1194,10 +1194,6 @@ static int fpm_conf_post_process(int force_daemon TSRMLS_DC) /* {{{ */
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (0 > fpm_log_open(0)) {
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (0 > fpm_event_pre_init(fpm_global_config.events_mechanism)) {
|
if (0 > fpm_event_pre_init(fpm_global_config.events_mechanism)) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
@ -1206,6 +1202,10 @@ static int fpm_conf_post_process(int force_daemon TSRMLS_DC) /* {{{ */
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (0 > fpm_log_open(0)) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
for (wp = fpm_worker_all_pools; wp; wp = wp->next) {
|
for (wp = fpm_worker_all_pools; wp; wp = wp->next) {
|
||||||
if (!wp->config->access_log || !*wp->config->access_log) {
|
if (!wp->config->access_log || !*wp->config->access_log) {
|
||||||
continue;
|
continue;
|
||||||
|
|
|
@ -46,6 +46,8 @@ int fpm_log_open(int reopen) /* {{{ */
|
||||||
if (0 > fd) {
|
if (0 > fd) {
|
||||||
zlog(ZLOG_SYSERROR, "failed to open access log (%s)", wp->config->access_log);
|
zlog(ZLOG_SYSERROR, "failed to open access log (%s)", wp->config->access_log);
|
||||||
return -1;
|
return -1;
|
||||||
|
} else {
|
||||||
|
zlog(ZLOG_DEBUG, "open access log (%s)", wp->config->access_log);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (reopen) {
|
if (reopen) {
|
||||||
|
|
|
@ -131,6 +131,7 @@
|
||||||
|
|
||||||
; Per pool prefix
|
; Per pool prefix
|
||||||
; It only applies on the following directives:
|
; It only applies on the following directives:
|
||||||
|
; - 'access.log'
|
||||||
; - 'slowlog'
|
; - 'slowlog'
|
||||||
; - 'listen' (unixsocket)
|
; - 'listen' (unixsocket)
|
||||||
; - 'chroot'
|
; - 'chroot'
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue