diff --git a/cmd/root.go b/cmd/root.go index 50aa520..d19e5c4 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -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