another attempt at fixing logging

This commit is contained in:
Matthew R. Kasun 2022-04-21 17:48:36 -04:00
parent 799f7f040c
commit e1b590d43f
3 changed files with 5 additions and 5 deletions

View file

@ -52,7 +52,7 @@ type ServerConfig struct {
Platform string `yaml:"platform"`
Database string `yaml:"database"`
DefaultNodeLimit int32 `yaml:"defaultnodelimit"`
Verbosity int `yaml:"verbosity"`
Verbosity int32 `yaml:"verbosity"`
ServerCheckinInterval int64 `yaml:"servercheckininterval"`
AuthProvider string `yaml:"authprovider"`
ClientID string `yaml:"clientid"`

View file

@ -25,6 +25,6 @@ func getVerbose() int32 {
if Verbosity >= 1 && Verbosity <= 3 {
return int32(Verbosity)
}
Verbosity = servercfg.GetVerbosity()
Verbosity = int(servercfg.GetVerbosity())
return int32(Verbosity)
}

View file

@ -348,7 +348,7 @@ func GetServer() string {
return server
}
func GetVerbosity() int {
func GetVerbosity() int32 {
var verbosity = 0
var err error
if os.Getenv("VERBOSITY") != "" {
@ -357,12 +357,12 @@ func GetVerbosity() int {
verbosity = 0
}
} else if config.Config.Server.Verbosity != 0 {
verbosity = config.Config.Server.Verbosity
verbosity = int(config.Config.Server.Verbosity)
}
if verbosity < 0 || verbosity > 3 {
verbosity = 0
}
return verbosity
return int32(verbosity)
}
// IsDNSMode - should it run with DNS