Skip to content

Commit

Permalink
chore: hide flow config in the logs by default
Browse files Browse the repository at this point in the history
Signed-off-by: Peter Wilcsinszky <peter.wilcsinszky@axoflow.com>
  • Loading branch information
pepov committed Mar 14, 2024
1 parent 3ccf034 commit 692e987
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions controllers/logging/logging_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,9 @@ func (r *LoggingReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ct
return &reconcile.Result{}, err
})
} else {
log.V(1).Info("flow configuration", "config", fluentdConfig)
if os.Getenv("SHOW_FLOW_CONFIG") != "" {
log.Info("flow configuration", "config", fluentdConfig)
}

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

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

0 comments on commit 692e987

Please sign in to comment.