Set log level from environment variable PHP_FPM_LOG_LEVEL
This commit is contained in:
parent
695caeeb25
commit
4f0d801b64
1 changed files with 4 additions and 0 deletions
|
@ -89,6 +89,10 @@ func initConfig() {
|
|||
func initLogger() {
|
||||
phpfpm.SetLogger(log)
|
||||
|
||||
if value := os.Getenv("PHP_FPM_LOG_LEVEL"); value != "" {
|
||||
logLevel = value
|
||||
}
|
||||
|
||||
lvl, err := logrus.ParseLevel(logLevel)
|
||||
if err != nil {
|
||||
lvl = logrus.InfoLevel
|
||||
|
|
Loading…
Reference in a new issue