Skip to content

Commit 421fefe

Browse files
authored
Merge pull request #1700 from kube-logging/hide-flow-config
chore: hide flow config in the logs by default
2 parents dd185e9 + 692e987 commit 421fefe

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

controllers/logging/logging_controller.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,9 @@ func (r *LoggingReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ct
192192
return &reconcile.Result{}, err
193193
})
194194
} else {
195-
log.V(1).Info("flow configuration", "config", fluentdConfig)
195+
if os.Getenv("SHOW_FLOW_CONFIG") != "" {
196+
log.Info("flow configuration", "config", fluentdConfig)
197+
}
196198

197199
reconcilers = append(reconcilers, fluentd.New(r.Client, r.Log, &logging, fluentdSpec, fluentdExternal, &fluentdConfig, secretList, reconcilerOpts).Reconcile)
198200
}
@@ -208,7 +210,9 @@ func (r *LoggingReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ct
208210
return &reconcile.Result{}, err
209211
})
210212
} else {
211-
log.V(1).Info("flow configuration", "config", syslogNGConfig)
213+
if os.Getenv("SHOW_FLOW_CONFIG") != "" {
214+
log.Info("flow configuration", "config", syslogNGConfig)
215+
}
212216

213217
reconcilers = append(reconcilers, syslogng.New(r.Client, r.Log, &logging, syslogNGSpec, syslogNGExternal, syslogNGConfig, secretList, reconcilerOpts).Reconcile)
214218
}

0 commit comments

Comments
 (0)