Log all HTTP requests with gorilla handlers.CombinedLoggingHandler in support of #85 (#112)

This commit is contained in:
Jesse Peterson
2017-03-21 22:25:31 -07:00
committed by GitHub
parent 6d1a49c1ef
commit 82d1686436
2 changed files with 22 additions and 3 deletions

View File

@@ -1,5 +1,5 @@
{
"memo": "877eab51bef6d9f956e53012ffbc61f2f41ee98472eb9b13c54ed57ab84b697e",
"memo": "89560ee069f29a9b67cde83f9423705cace25cae08dac68338a04d056c45e7c9",
"projects": [
{
"name": "github.com/RobotsAndPencils/buford",
@@ -7,6 +7,7 @@
"revision": "d6d71aff1447ced56016d09a5d74f4ea488a2d75",
"packages": [
"payload",
"payload/badge",
"push"
]
},
@@ -85,6 +86,14 @@
"."
]
},
{
"name": "github.com/gorilla/handlers",
"version": "v1.2",
"revision": "3a5767ca75ece5f7f1440b1d16975247f8d8b221",
"packages": [
"."
]
},
{
"name": "github.com/gorilla/mux",
"version": "v1.3.0",
@@ -130,7 +139,10 @@
"branch": "master",
"revision": "a202afd5e358b857c95d048fc47432759db0d9bd",
"packages": [
"depot",
"depot/bolt",
"scep",
"scep/internal/pkcs7",
"server"
]
},
@@ -155,8 +167,10 @@
"branch": "master",
"revision": "459e26527287adbc2adcc5d0d49abff9a5f315a7",
"packages": [
"acme",
"acme/autocert",
"pkcs12"
"pkcs12",
"pkcs12/internal/rc2"
]
},
{
@@ -166,7 +180,10 @@
"packages": [
"context",
"context/ctxhttp",
"http2"
"http2",
"http2/hpack",
"idna",
"lex/httplex"
]
},
{

View File

@@ -32,6 +32,7 @@ import (
"github.com/go-kit/kit/endpoint"
"github.com/go-kit/kit/log"
httptransport "github.com/go-kit/kit/transport/http"
"github.com/gorilla/handlers"
"github.com/gorilla/mux"
"github.com/pkg/errors"
@@ -177,6 +178,7 @@ func serve(args []string) error {
} else {
handler = r
}
handler = handlers.CombinedLoggingHandler(os.Stdout, handler)
srv := &http.Server{
Addr: *flHTTPAddr,
Handler: handler,