improving logging

This commit is contained in:
Julien Neuhart
2019-07-08 11:06:26 +02:00
parent 5af01505c2
commit 70b185a37a
11 changed files with 49 additions and 28 deletions

View File

@@ -30,8 +30,7 @@ func Context(config *config.Config) echo.MiddlewareFunc {
// if the endpoint is not for healthcheck, associate a
// resource to our custom context.
if err := ctx.WithResource(trace); err != nil {
// required to have a correct status code
// in the logs.
// required to have a correct status code.
ctx.Error(err)
return ctx.LogRequestResult(err, false)
}