Skip to content

Commit

Permalink
Fixes to logging
Browse files Browse the repository at this point in the history
Signed-off-by: thebsdbox <[email protected]>
  • Loading branch information
thebsdbox committed Oct 31, 2022
1 parent 5330992 commit 8687d28
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cmd/kube-vip.go
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ var kubeVipManager = &cobra.Command{
}

// Set the logging level for all subsequent functions
log.SetLevel(log.Level(logLevel))
log.SetLevel(log.Level(initConfig.Logging))

// start prometheus server
if initConfig.PrometheusHTTPServer != "" {
Expand Down
3 changes: 1 addition & 2 deletions pkg/kubevip/config_environment.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (

"github.com/kube-vip/kube-vip/pkg/bgp"
"github.com/kube-vip/kube-vip/pkg/detector"
log "github.com/sirupsen/logrus"
)

// ParseEnvironment - will popultate the configuration from environment variables
Expand All @@ -19,7 +18,7 @@ func ParseEnvironment(c *Config) error {
if err != nil {
panic("Unable to parse environment variable [vip_loglevel], should be int")
}
log.SetLevel(log.Level(logLevel))
c.Logging = int(logLevel)
}

// Find interface
Expand Down
3 changes: 3 additions & 0 deletions pkg/kubevip/config_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ import (
// Config defines all of the settings for the Kube-Vip Pod
type Config struct {

// Logging, settings
Logging int `yaml:"logging"`

// EnableARP, will use ARP to advertise the VIP address
EnableARP bool `yaml:"enableARP"`

Expand Down

0 comments on commit 8687d28

Please sign in to comment.