all logs now have an op field

This commit is contained in:
Julien Neuhart
2019-07-07 19:54:44 +02:00
parent c8f7ea934c
commit 5f6ab2fc08
16 changed files with 240 additions and 85 deletions

View File

@@ -20,8 +20,9 @@ func Error() echo.MiddlewareFunc {
}
// we log the initial error before returning
// the HTTP error.
errOp := standarderror.Op(err)
logger := ctx.StandardLogger()
logger.Error(err.Error())
logger.ErrorOp(errOp, err)
// handle our custom HTTP error.
var httpErr error
errCode := standarderror.Code(err)