improve gin logging

This commit is contained in:
Brad Rydzewski 2016-04-11 16:03:54 -07:00
parent 1fb47612c0
commit 3235990584
2 changed files with 5 additions and 1 deletions

View file

@ -33,6 +33,8 @@ func main() {
// debug level if requested by user
if *debug {
logrus.SetLevel(logrus.DebugLevel)
} else {
logrus.SetLevel(logrus.WarnLevel)
}
// Load the configuration from env file

View file

@ -17,7 +17,9 @@ import (
)
func Load(middleware ...gin.HandlerFunc) http.Handler {
e := gin.Default()
e := gin.New()
e.Use(gin.Recovery())
e.SetHTMLTemplate(template.Load())
e.StaticFS("/static", static.FileSystem())