php-docker-template icon indicating copy to clipboard operation
php-docker-template copied to clipboard

Add log_level for FPM logs

Open agustingomes opened this issue 4 years ago • 1 comments

Usabilla PHP Docker Template

Reviewers: @usabilla/oss-docker

Type

Please specify the type of changes being proposed:

Q A
Documentation? yes
Dockerfile change? no
Build feature? yes
Apply CVE Patch? no
Remove CVE Patch? no

Changelog

This change aims to add control over the log level outputted by FPM itself. I've noticed we have a high volume of logs with notice level that will look like this:

"[22-Feb-2021 09:17:02] NOTICE: [pool www] child 10444 started"
"[22-Feb-2021 09:17:03] NOTICE: [pool www] child 10320 exited with code 0 after 17.567216 seconds from start"
"[22-Feb-2021 09:17:03] NOTICE: [pool www] child 10445 started"
"[22-Feb-2021 09:17:09] NOTICE: [pool www] child 10359 exited with code 0 after 16.352465 seconds from start"
"[22-Feb-2021 09:17:09] NOTICE: [pool www] child 10514 started"
"[22-Feb-2021 09:17:11] NOTICE: [pool www] child 10360 exited with code 0 after 17.717351 seconds from start"
"[22-Feb-2021 09:17:11] NOTICE: [pool www] child 10523 started"
"[22-Feb-2021 09:17:11] NOTICE: [pool www] child 10400 exited with code 0 after 17.065780 seconds from start"

The new variable added will allow us to control the minimum level we want our FPM processes to log. note that this logging is different than the one from the application itself.

agustingomes avatar Feb 25 '21 12:02 agustingomes

Can you please document this in the README?

@agustingomes And set the current defaults in the Dockerfile's?

Also internally, not sure we want to lower our threshold, as these logs have been useful. Right @WyriHaximus ?

@rdohms At the moment we need these logs to detect certain issues. So yes they are very useful.

WyriHaximus avatar Feb 25 '21 14:02 WyriHaximus