rename gin logging function to clarify that it's middleware

This commit is contained in:
R. Aidan Campbell 2021-10-10 16:49:38 -07:00
commit c8d78a854b
No known key found for this signature in database
GPG key ID: 0985399E9CD6A99B
2 changed files with 2 additions and 2 deletions

View file

@ -30,7 +30,7 @@ var skipPaths = map[string]interface{}{
"/api/v1/streaming": nil,
}
func loggerWithConfig() gin.HandlerFunc {
func loggingMiddleware() gin.HandlerFunc {
logHandler := func(c *gin.Context) {
start := time.Now()
path := c.Request.URL.Path

View file

@ -109,7 +109,7 @@ func New(ctx context.Context, cfg *config.Config, db db.DB) (Router, error) {
engine := gin.New()
engine.Use(gin.RecoveryWithWriter(logrus.StandardLogger().Writer()))
engine.Use(loggerWithConfig())
engine.Use(loggingMiddleware())
// 8 MiB
engine.MaxMultipartMemory = 8 << 20