Updated to use logger.Log for PUBLIC_IP_SERVICE checks at verbosity of 3. Required some updates elsewhere to allowing using logger.Log from servercfg package.

This commit is contained in:
cameronts
2022-07-27 07:32:24 -07:00
parent 9e5e1b24b4
commit a2f2b81142
3 changed files with 10 additions and 7 deletions

View File

@@ -42,6 +42,7 @@ func main() {
fmt.Println(models.RetrieveLogo()) // print the logo
initialize() // initial db and acls; gen cert if required
setGarbageCollection()
setVerbosity()
defer database.CloseDB()
startControllers() // start the api endpoint and mq
}
@@ -182,6 +183,11 @@ func runMessageQueue(wg *sync.WaitGroup) {
client.Disconnect(250)
}
func setVerbosity() {
verbose := int(servercfg.GetVerbosity())
logger.Verbosity = verbose
}
func setGarbageCollection() {
_, gcset := os.LookupEnv("GOGC")
if !gcset {