Skip to content

Commit c50ee65

Browse files
committed
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
1 parent bc55af0 commit c50ee65

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

sapi/fpm/fpm/fpm_conf.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1194,15 +1194,15 @@ static int fpm_conf_post_process(int force_daemon TSRMLS_DC) /* {{{ */
11941194
return -1;
11951195
}
11961196

1197-
if (0 > fpm_log_open(0)) {
1197+
if (0 > fpm_event_pre_init(fpm_global_config.events_mechanism)) {
11981198
return -1;
11991199
}
12001200

1201-
if (0 > fpm_event_pre_init(fpm_global_config.events_mechanism)) {
1201+
if (0 > fpm_conf_process_all_pools()) {
12021202
return -1;
12031203
}
12041204

1205-
if (0 > fpm_conf_process_all_pools()) {
1205+
if (0 > fpm_log_open(0)) {
12061206
return -1;
12071207
}
12081208

sapi/fpm/fpm/fpm_log.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ int fpm_log_open(int reopen) /* {{{ */
4646
if (0 > fd) {
4747
zlog(ZLOG_SYSERROR, "failed to open access log (%s)", wp->config->access_log);
4848
return -1;
49+
} else {
50+
zlog(ZLOG_DEBUG, "open access log (%s)", wp->config->access_log);
4951
}
5052

5153
if (reopen) {

sapi/fpm/php-fpm.conf.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@
131131

132132
; Per pool prefix
133133
; It only applies on the following directives:
134+
; - 'access.log'
134135
; - 'slowlog'
135136
; - 'listen' (unixsocket)
136137
; - 'chroot'

0 commit comments

Comments
 (0)