mirror of
https://github.com/gravitl/netmaker.git
synced 2025-10-05 16:57:51 +08:00
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:
6
main.go
6
main.go
@@ -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 {
|
||||
|
Reference in New Issue
Block a user