Skip to content

Commit

Permalink
Merge pull request #1700 from kube-logging/hide-flow-config
Browse files Browse the repository at this point in the history
chore: hide flow config in the logs by default
  • Loading branch information
pepov authored Mar 14, 2024
2 parents dd185e9 + 692e987 commit 421fefe
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 421fefe

Please sign in to comment.