|
@@ -90,6 +90,7 @@ func GinLogger() gin.HandlerFunc {
|
|
query := c.Request.URL.RawQuery
|
|
query := c.Request.URL.RawQuery
|
|
spanID := NewUUID()
|
|
spanID := NewUUID()
|
|
c.Set("X-Span-ID", spanID)
|
|
c.Set("X-Span-ID", spanID)
|
|
|
|
+ c.Next()
|
|
cost := time.Since(start)
|
|
cost := time.Since(start)
|
|
Lg.Info(path,
|
|
Lg.Info(path,
|
|
zap.Int("status", c.Writer.Status()),
|
|
zap.Int("status", c.Writer.Status()),
|
|
@@ -102,7 +103,6 @@ func GinLogger() gin.HandlerFunc {
|
|
zap.String("errors", c.Errors.ByType(gin.ErrorTypePrivate).String()),
|
|
zap.String("errors", c.Errors.ByType(gin.ErrorTypePrivate).String()),
|
|
zap.Duration("cost", cost),
|
|
zap.Duration("cost", cost),
|
|
)
|
|
)
|
|
- c.Next()
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|