Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultLogger ¶
func DefaultLogger() *zap.SugaredLogger
DefaultLogger returns the default logger for the package.
func FromContext ¶
func FromContext(ctx context.Context) *zap.SugaredLogger
FromContext returns the logger stored in the context. If no such logger exists, a default logger is returned.
func NewLogger ¶
func NewLogger(conf *Config) *zap.SugaredLogger
NewLogger creates a new logger with the given log level
func SetConfig ¶
func SetConfig(c *Config)
SetConfig sets given logging configs for DefaultLogger's logger. Must set configs before calling DefaultLogger()
func WithLogger ¶
WithLogger creates a new context with the provided logger attached.
Types ¶
Click to show internal directories.
Click to hide internal directories.