mirror of
https://github.com/redhat-developer/odo.git
synced 2025-10-19 03:06:19 +03:00
* Add enviroment variable "ODO_LOG_LEVEL" to control odo verbosity. Command line flag "-v", if set, will take precedence over "ODO_LOG_LEVEL"
This commit is contained in:
committed by
OpenShift Merge Robot
parent
b5720763ac
commit
5eb0ff5e73
@@ -43,6 +43,13 @@ func main() {
|
||||
}
|
||||
}
|
||||
|
||||
// Override the logging level by the value (if set) by the ODO_LOG_LEVEL env
|
||||
// The "-v" flag set on command line will take precedence over ODO_LOG_LEVEL env
|
||||
v := flag.CommandLine.Lookup("v").Value.String()
|
||||
if level, ok := os.LookupEnv("ODO_LOG_LEVEL"); ok && v == "0" {
|
||||
_ = flag.CommandLine.Set("v", level)
|
||||
}
|
||||
|
||||
// run the completion, in case that the completion was invoked
|
||||
// and ran as a completion script or handled a flag that passed
|
||||
// as argument, the Run method will return true,
|
||||
|
||||
Reference in New Issue
Block a user