VA Log Configuration Commands, etc...

* 🪵 Implemented an Improved Global logger solution
* 🥈 Removed duplicate APIClient inits
* 🐛 Corrected an issue with the payload for spconfig import
* 🚤 Significantly improved the Speed of Parsing log files with sail va parse
* 🎢 Improved error handling for all VA commands
* 💻 Added a VA List Command, along with Get and Set commands for VA Log Config
This commit is contained in:
luke-hagar-sp
2023-05-16 09:01:34 -05:00
parent 10d8ac3be5
commit c4c15361d6
2655 changed files with 685 additions and 863023 deletions

View File

@@ -3,7 +3,7 @@ package set
import (
"strings"
"github.com/sailpoint-oss/sailpoint-cli/internal/config"
"github.com/charmbracelet/log"
"github.com/spf13/cobra"
"github.com/spf13/viper"
)
@@ -20,18 +20,18 @@ func newDebugCommand() *cobra.Command {
switch strings.ToLower(args[0]) {
case "enable":
viper.Set("debug", true)
config.Log.Info("Debug Enabled")
log.Info("Debug Enabled")
case "true":
viper.Set("debug", true)
config.Log.Info("Debug Enabled")
log.Info("Debug Enabled")
case "disable":
viper.Set("debug", false)
config.Log.Info("Debug Disabled")
log.Info("Debug Disabled")
case "false":
viper.Set("debug", false)
config.Log.Info("Debug Disabled")
log.Info("Debug Disabled")
default:
config.Log.Error("Invalid Selection")
log.Error("Invalid Selection")
}
return nil