Fixed ENV log level setting

Signed-off-by: Patryk Strusiewicz-Surmacki <patryk-pawel.strusiewicz-surmacki@external.telekom.de>
This commit is contained in:
Patryk Strusiewicz-Surmacki
2025-02-10 16:18:13 +01:00
committed by Marcel Fest
parent 2ceba7f5ad
commit 53185bd58d

View File

@@ -202,6 +202,9 @@ var kubeVipService = &cobra.Command{
return
}
// Set the logging level for all subsequent functions
log.SetLogLoggerLevel(log.Level(initConfig.Logging))
if err := initConfig.CheckInterface(); err != nil {
log.Error("checking interface", "err", err)
return
@@ -249,6 +252,9 @@ var kubeVipManager = &cobra.Command{
return
}
// Set the logging level for all subsequent functions
log.SetLogLoggerLevel(log.Level(initConfig.Logging))
// Ensure there is an address to generate the CIDR from
if initConfig.VIPCIDR == "" && initConfig.Address != "" {
initConfig.VIPCIDR, err = GenerateCidrRange(initConfig.Address)