Skip to content

Commit

Permalink
Merge pull request #1182 from noironetworks/add-debug-option-op
Browse files Browse the repository at this point in the history
add option to set logging level to debug for aci container operator
  • Loading branch information
abhis2112 committed Oct 19, 2023
2 parents 2b47123 + abc7356 commit b69dbb5
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions pkg/controller/acicontainersoperator.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,20 @@ import (
operatorclientset "github.com/noironetworks/aci-containers/pkg/acicontainersoperator/clientset/versioned"
)

func init() {
lvl, ok := os.LookupEnv("OPERATOR_LOGGING_LEVEL")
// LOG_LEVEL not set, let's default to info
if !ok {
lvl = "info"
}
ll, err := log.ParseLevel(lvl)
if err != nil {
ll = log.InfoLevel
}
// set global log level
log.SetLevel(ll)
}

// AciResources is a struct for handeling the resources of aci fabric
type AciResources struct {
Deployment *appsv1.Deployment
Expand Down

0 comments on commit b69dbb5

Please sign in to comment.