diff options
author | David Zuelke <dzuelke@gmail.com> | 2014-11-08 17:22:54 -0500 |
---|---|---|
committer | Remi Collet <remi@php.net> | 2014-11-18 17:42:21 +0100 |
commit | 03cf70ab1e35305443ac379ee5219d19aeeb6ba2 (patch) | |
tree | b02eb6f41b4647d727a6d69290e28cad3fa41fc5 | |
parent | 09f9f7ce5030973052bca5043425bd9f20ad7a7e (diff) | |
download | php-git-03cf70ab1e35305443ac379ee5219d19aeeb6ba2.tar.gz |
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+
-rw-r--r-- | sapi/fpm/fpm/fpm_unix.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sapi/fpm/fpm/fpm_unix.c b/sapi/fpm/fpm/fpm_unix.c index ea0e67369c..5dfdb4ab38 100644 --- a/sapi/fpm/fpm/fpm_unix.c +++ b/sapi/fpm/fpm/fpm_unix.c @@ -231,6 +231,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; @@ -361,7 +363,6 @@ int fpm_unix_init_main() /* {{{ */ } } - zlog_set_level(fpm_globals.log_level); return 0; } /* }}} */ |