diff --git a/README.MD b/README.MD index 8a9bfb7..a81b236 100644 --- a/README.MD +++ b/README.MD @@ -61,6 +61,8 @@ nxos: `-filename` - (required) the path to the configuration yaml file created previously `-out` - (optional) the filename for the results report. + + `-logging` - (optional) sets the logging level during script execution. Valid values are `info`, `debug`, or `trace` ### Entering a password diff --git a/main.go b/main.go index 9d0047c..721047d 100644 --- a/main.go +++ b/main.go @@ -1668,12 +1668,22 @@ func main() { //* Read configuration file from supplied filename config_file := flag.String("filename", "config.yaml", "yaml config filename") output_file := flag.String("out", "nexus_cloud_readiness", "output filename") + logging_level := flag.String("logging", "info", "logging level") flag.Parse() config, err := readConf(*config_file) if err != nil { log.Fatal(err) } + switch *logging_level { + case "debug": + log.SetLevel(log.DebugLevel) + break + case "trace": + log.SetLevel(log.TraceLevel) + break + } + //* Retrieve support matrix log.Println("Loading matrix") matrix, err := configuration.GetConfigurationMatrix()