Documentation ¶
Overview ¶
Package logger provides a wrapper for the zap logger.
Index ¶
- func ContextWithLogger(ctx context.Context, l *zap.Logger) context.Context
- func FromContext(ctx context.Context) *zap.Logger
- func FromRequest(c *gin.Context) *zap.Logger
- func FromRequestToContext(c *gin.Context) context.Context
- func New(console io.Writer, opts ...Option) *zap.Logger
- func RequestWithLogger(c *gin.Context, l *zap.Logger)
- type Level
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContextWithLogger ¶
ContextWithLogger adds logger to context.
func FromContext ¶
FromContext returns logger from context.
func FromRequest ¶
FromRequest returns logger from request.
func FromRequestToContext ¶
FromRequestToContext sets logger from request to context.
Types ¶
Click to show internal directories.
Click to hide internal directories.