com php-src: Fixed bug #68381 Set FPM log level earlier during init: sapi/fpm/fpm/fpm_unix.c
| From: | Remi Collet | Date: | Tue, 18 Nov 2014 16:45:49 +0000 |
| Subject: | com php-src: Fixed bug #68381 Set FPM log level earlier during init: sapi/fpm/fpm/fpm_unix.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-83144@lists.php.net to get a copy of this message | ||
Commit: 9a43410871c76f9b3e712295ff49fa1f832ab17e
Author: David Zuelke <dzuelke@gmail.com> Sat, 8 Nov 2014 17:22:54 -0500
Committer: Remi Collet <remi@php.net> Tue, 18 Nov 2014 17:45:49 +0100
Parents: ec26d7a80f1d486d79d6319f891bd474bad3710d
Branches: PHP-5.6 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=9a43410871c76f9b3e712295ff49fa1f832ab17e
Log:
Fixed bug #68381 Set FPM log level earlier during init
The log level will be ignored throughout log events in fpm_unix_init_main, until
the very end when zlog_set_level is finally called.
In particular, fpm_unix_conf_wp may throw notices like this:
> [08-Nov-2014 17:13:36] NOTICE: [pool www] 'user' directive is ignored when…
Which will still appear even if log_level in php-fpm.conf is set to warning+
Bugs:
https://bugs.php.net/68381
Changed paths:
M sapi/fpm/fpm/fpm_unix.c
Diff:
diff --git a/sapi/fpm/fpm/fpm_unix.c b/sapi/fpm/fpm/fpm_unix.c
index 68978ee..c29e28f 100644
--- a/sapi/fpm/fpm/fpm_unix.c
+++ b/sapi/fpm/fpm/fpm_unix.c
@@ -266,6 +266,8 @@ int fpm_unix_init_main() /* {{{ */
struct fpm_worker_pool_s *wp;
int is_root = !geteuid();
+ zlog_set_level(fpm_globals.log_level);
+
if (fpm_global_config.rlimit_files) {
struct rlimit r;
@@ -396,7 +398,6 @@ int fpm_unix_init_main() /* {{{ */
}
}
- zlog_set_level(fpm_globals.log_level);
return 0;
}
/* }}} */