Documentation ¶
Index ¶
- func LoggerFromContext(ctx context.Context) *zap.SugaredLogger
- func NewLogger(level string, opts ...zap.Option) (*zap.SugaredLogger, zap.AtomicLevel)
- func NewLoggerFromConfig(configYaml string, levelOverride string, opts ...zap.Option) (*zap.SugaredLogger, zap.AtomicLevel, error)
- func WithLogger(ctx context.Context, logger *zap.SugaredLogger) context.Context
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoggerFromContext ¶
func LoggerFromContext(ctx context.Context) *zap.SugaredLogger
LoggerFromContext returns the logger from the context
func NewLogger ¶
func NewLogger(level string, opts ...zap.Option) (*zap.SugaredLogger, zap.AtomicLevel)
NewLogger returns a new instance of logger
func NewLoggerFromConfig ¶
func NewLoggerFromConfig(configYaml string, levelOverride string, opts ...zap.Option) (*zap.SugaredLogger, zap.AtomicLevel, error)
NewLoggerFromConfig returns a new instance of logger from Config
func WithLogger ¶
WithLogger add the current logger to context and returns the context
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.