aboutsummaryrefslogtreecommitdiff
path: root/cmd/app/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/app/main.go')
-rw-r--r--cmd/app/main.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/cmd/app/main.go b/cmd/app/main.go
index 3f071de..d663e3d 100644
--- a/cmd/app/main.go
+++ b/cmd/app/main.go
@@ -12,6 +12,7 @@ import (
12 "github.com/gin-contrib/cors" 12 "github.com/gin-contrib/cors"
13 "github.com/gin-gonic/gin" 13 "github.com/gin-gonic/gin"
14 "github.com/jloup/utils" 14 "github.com/jloup/utils"
15 "github.com/wercker/journalhook"
15) 16)
16 17
17var log = utils.StandardL().WithField("module", "api") 18var log = utils.StandardL().WithField("module", "api")
@@ -60,6 +61,7 @@ func init() {
60 panic(err) 61 panic(err)
61 } 62 }
62 63
64 journalhook.Enable()
63 api.SetConfig(C.Api.Config) 65 api.SetConfig(C.Api.Config)
64 api.SetMailConfig(C.Mail) 66 api.SetMailConfig(C.Mail)
65 67
@@ -115,7 +117,7 @@ func main() {
115 117
116 engine.Use(gin.Recovery()) 118 engine.Use(gin.Recovery())
117 119
118 if C.Mode == "production" { 120 if C.Mode == "prod" {
119 engine.Use(api.Logger()) 121 engine.Use(api.Logger())
120 apiGroup.Use(api.Logger()) 122 apiGroup.Use(api.Logger())
121 } else { 123 } else {