From 0520dab47d61e2c4de246459bf4f5c72d69182d3 Mon Sep 17 00:00:00 2001 From: Emiliano Ciavatta Date: Thu, 9 Apr 2020 10:26:15 +0200 Subject: Refactor storage --- routes.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'routes.go') diff --git a/routes.go b/routes.go index f44cff7..3759382 100644 --- a/routes.go +++ b/routes.go @@ -4,7 +4,7 @@ import ( "fmt" "github.com/gin-gonic/gin" "github.com/go-playground/validator/v10" - "log" + log "github.com/sirupsen/logrus" "net/http" ) @@ -23,6 +23,7 @@ func ApplicationRoutes(engine *gin.Engine) { "error": fmt.Sprintf("field '%v' does not respect the %v(%v) rule", fieldErr.Field(), fieldErr.Tag(), fieldErr.Param()), }) + log.WithError(err).WithField("rule", rule).Panic("oops") return // exit on first error } } -- cgit v1.2.3-70-g09d2