mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-09-30 11:21:28 +02:00
Increase log verbosity, namely for object updates.
- add a new environment variable for triggering debug log level - show both new, old object and diff during syncs and updates - use pretty package to pretty-print go structures -
This commit is contained in:
committed by
Murat Kabilov
parent
8c2a44a242
commit
3a4c6268be
@@ -39,10 +39,15 @@ type Controller struct {
|
||||
}
|
||||
|
||||
func New(controllerConfig *Config, operatorConfig *config.Config) *Controller {
|
||||
if operatorConfig.DebugLogging {
|
||||
logrus.SetLevel(logrus.DebugLevel)
|
||||
}
|
||||
logger := logrus.WithField("pkg", "controller")
|
||||
logger.Debugf("Debug output enabled")
|
||||
return &Controller{
|
||||
Config: *controllerConfig,
|
||||
opConfig: operatorConfig,
|
||||
logger: logrus.WithField("pkg", "controller"),
|
||||
logger: logger,
|
||||
clusters: make(map[spec.ClusterName]*cluster.Cluster),
|
||||
stopChMap: make(map[spec.ClusterName]chan struct{}),
|
||||
podCh: make(chan spec.PodEvent),
|
||||
|
||||
Reference in New Issue
Block a user