mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-09-30 11:02:40 +02:00
Introduce ENABLE_JSON_LOGGING env variable (#1158)
This commit is contained in:
@@ -71,6 +71,9 @@ type Controller struct {
|
||||
// NewController creates a new controller
|
||||
func NewController(controllerConfig *spec.ControllerConfig, controllerId string) *Controller {
|
||||
logger := logrus.New()
|
||||
if controllerConfig.EnableJsonLogging {
|
||||
logger.SetFormatter(&logrus.JSONFormatter{})
|
||||
}
|
||||
|
||||
var myComponentName = "postgres-operator"
|
||||
if controllerId != "" {
|
||||
|
||||
Reference in New Issue
Block a user