import (
"fmt"
- "strings"
"time"
"github.com/Sirupsen/logrus"
level = logrus.ErrorLevel
}
- comment := c.Errors.ByType(gin.ErrorTypePrivate).String()
- if comment != "" {
- msgLog = fmt.Sprintf("%s: %s", msgLog, strings.TrimSpace(comment))
+ errors := c.Errors.ByType(gin.ErrorTypePrivate)
+
+ for _, err := range errors {
+ l.Logf(level, "%s: %s", msgLog, err.Err)
}
- l.Logf(level, msgLog)
+ if errors == nil {
+ l.Logf(level, msgLog)
+ }
}
}