File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change 77
88 "github.com/spf13/cobra"
99 "github.com/spf13/pflag"
10+
11+ "github.com/jetstack/preflight/pkg/logs"
1012)
1113
1214// rootCmd represents the base command when called without any subcommands
@@ -17,6 +19,14 @@ var rootCmd = &cobra.Command{
1719configuration checks using Open Policy Agent (OPA).
1820
1921Preflight checks are bundled into Packages` ,
22+ // SilenceErrors and SilenceUsage prevents this command or any sub-command
23+ // from printing arbitrary text to stderr.
24+ // Why? To ensure that each line of output can be parsed as a single message
25+ // for consumption by logging agents such as fluentd.
26+ // Usage information is still available on stdout with the `-h` and `--help`
27+ // flags.
28+ SilenceErrors : true ,
29+ SilenceUsage : true ,
2030}
2131
2232func init () {
You can’t perform that action at this time.
0 commit comments