mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
Log messages cleanup (#158)
This commit is contained in:
committed by
Seif Lotfy سيف لطفي
parent
4cbfb3ccfd
commit
34b4b25092
8
main.go
8
main.go
@@ -9,6 +9,7 @@ import (
|
||||
"sync"
|
||||
|
||||
log "github.com/Sirupsen/logrus"
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/iron-io/functions/api/datastore"
|
||||
"github.com/iron-io/functions/api/mqs"
|
||||
"github.com/iron-io/functions/api/runner"
|
||||
@@ -46,6 +47,11 @@ func init() {
|
||||
log.WithError(err).Fatalln("Invalid log level.")
|
||||
}
|
||||
log.SetLevel(logLevel)
|
||||
|
||||
gin.SetMode(gin.ReleaseMode)
|
||||
if logLevel == log.DebugLevel {
|
||||
gin.SetMode(gin.DebugMode)
|
||||
}
|
||||
}
|
||||
|
||||
func main() {
|
||||
@@ -74,7 +80,7 @@ func main() {
|
||||
}
|
||||
|
||||
apiURL, port, numAsync := viper.GetString(envAPIURL), viper.GetString(envPort), viper.GetInt(envNumAsync)
|
||||
log.Info("async workers:", numAsync)
|
||||
log.Debug("async workers:", numAsync)
|
||||
var wgAsync sync.WaitGroup
|
||||
if numAsync > 0 {
|
||||
wgAsync.Add(1)
|
||||
|
||||
Reference in New Issue
Block a user