]> git.immae.eu Git - perso/Immae/Projets/Cryptomonnaies/Cryptoportfolio/Front.git/commitdiff
Attempt to log to systemd.
authorjloup <jloup@jloup.work>
Wed, 16 May 2018 10:30:58 +0000 (12:30 +0200)
committerjloup <jloup@jloup.work>
Wed, 16 May 2018 10:33:27 +0000 (12:33 +0200)
Gopkg.lock
Gopkg.toml
cmd/app/main.go

index 2a6ae4fe7d111906abe36ab0295a7009143cb335..97bf5a5c20480e78b2a721d31862094d32e21eba 100644 (file)
   revision = "3cfea5ab600ae37946be2b763b8ec2c1cf2d272d"
   version = "v1.0.0"
 
+[[projects]]
+  name = "github.com/coreos/go-systemd"
+  packages = ["journal"]
+  revision = "39ca1b05acc7ad1220e09f133283b8859a8b71ab"
+  version = "v17"
+
 [[projects]]
   branch = "master"
   name = "github.com/dchest/authcookie"
   revision = "b4c50a2b199d93b13dc15e78929cfb23bfdf21ab"
   version = "v1.1.1"
 
+[[projects]]
+  branch = "pin_dependency"
+  name = "github.com/wercker/journalhook"
+  packages = ["."]
+  revision = "35950c648b44426a2590d4e316cdd409a53363ea"
+
 [[projects]]
   branch = "master"
   name = "golang.org/x/crypto"
 [solve-meta]
   analyzer-name = "dep"
   analyzer-version = 1
-  inputs-digest = "9df92ae3bbf81638f86228e1daacd75bd4f6d0afbfc449742e7f28fdefffdc46"
+  inputs-digest = "0bc4b06298ce7964140ac7d3e5e58915b01d6a53413af394501d5bf86683d9d7"
   solver-name = "gps-cdcl"
   solver-version = 1
index 31e55bda6b6c34a57a6539f49ad8f5fb7cfab706..8e8c331ebadd7643142c250013b9a401d6ebd581 100644 (file)
@@ -80,3 +80,7 @@
 [[constraint]]
   name = "github.com/matcornic/hermes"
   version = "1.1.1"
+
+[[constraint]]
+  branch = "pin_dependency"
+  name = "github.com/wercker/journalhook"
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 {