(c *gin.Context, logger *zap.Logger)
| 22 | } |
| 23 | |
| 24 | func SetLogToCtx(c *gin.Context, logger *zap.Logger) { |
| 25 | c.Request = c.Request.WithContext(context.WithValue(c.Request.Context(), STRING_LOG, logger)) |
| 26 | } |
| 27 | |
| 28 | func GetLogFromCtx(c *gin.Context) *zap.Logger { |
| 29 | logWithCid := c.Request.Context().Value(STRING_LOG).(*zap.Logger) |
no outgoing calls
no test coverage detected