]> git.immae.eu Git - perso/Immae/Projets/Cryptomonnaies/Cryptoportfolio/Front.git/blobdiff - cmd/app/main.go
Attempt to log to systemd.
[perso/Immae/Projets/Cryptomonnaies/Cryptoportfolio/Front.git] / cmd / app / main.go
index 3f071de66f0c46d723b43e7c5a6bc08c3d7fd34d..d663e3d62d8898dfac5d5013c4ba90213df2901d 100644 (file)
@@ -12,6 +12,7 @@ import (
        "github.com/gin-contrib/cors"
        "github.com/gin-gonic/gin"
        "github.com/jloup/utils"
+       "github.com/wercker/journalhook"
 )
 
 var log = utils.StandardL().WithField("module", "api")
@@ -60,6 +61,7 @@ func init() {
                panic(err)
        }
 
+       journalhook.Enable()
        api.SetConfig(C.Api.Config)
        api.SetMailConfig(C.Mail)
 
@@ -115,7 +117,7 @@ func main() {
 
        engine.Use(gin.Recovery())
 
-       if C.Mode == "production" {
+       if C.Mode == "prod" {
                engine.Use(api.Logger())
                apiGroup.Use(api.Logger())
        } else {