From 05519f49bd0c1c53ce30447c0bd7f4db4f8a502b Mon Sep 17 00:00:00 2001 From: srinandan <13950006+srinandan@users.noreply.github.com> Date: Mon, 16 Jan 2023 14:23:47 -0800 Subject: [PATCH] Fixes verbose output #102 --- cmd/root.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cmd/root.go b/cmd/root.go index e4cb7b8..6367e25 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -73,7 +73,7 @@ func Execute() { } var accessToken, serviceAccount string -var disableCheck, useApigee, noOutput bool +var disableCheck, useApigee, noOutput, verbose bool func init() { cobra.OnInitialize(initConfig) @@ -93,6 +93,9 @@ func init() { RootCmd.PersistentFlags().BoolVarP(&noOutput, "no-output", "", false, "Disable printing API responses from the control plane") + RootCmd.PersistentFlags().BoolVarP(&verbose, "verbose", "", + false, "Enable verbose output from integrationcli") + RootCmd.AddCommand(integrations.Cmd) RootCmd.AddCommand(preferences.Cmd) RootCmd.AddCommand(authconfigs.Cmd) @@ -105,7 +108,7 @@ func initConfig() { var skipLogInfo = true var skipCache bool - if os.Getenv("INTEGRATIONCLI_SKIPLOG") == "false" { + if os.Getenv("INTEGRATIONCLI_SKIPLOG") == "false" || verbose { skipLogInfo = false }