Skip to content

Commit

Permalink
Enable debug log asap (#578)
Browse files Browse the repository at this point in the history
  • Loading branch information
Itxaka authored Oct 16, 2024
1 parent e2c3a0e commit f24511b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ type Install struct {

func NewConfig(opts ...GenericOptions) *Config {
log := sdkTypes.NewKairosLogger("agent", "info", false)
// Get the viper config in case something in command line or env var has set it and set the level asap
if viper.GetBool("debug") {
log.SetLevel("debug")
}

hostPlatform, err := v1.NewPlatformFromArch(runtime.GOARCH)
if err != nil {
Expand Down

0 comments on commit f24511b

Please sign in to comment.