Documentation
¶
Overview ¶
Package uzap contains basic configuration for go.uber.org/zap, for easy use with 12-factor apps.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MustZap ¶
func MustZap() func()
MustZap is an ease of use function that replaces zap globals and redirects standard `package log` output to a new zap logger. It returns a deferrable function, for calling zap.Logger.Sync at program termination.
func MustZapWithLevel ¶
MustZapWithLevel is an ease of use function that replaces zap globals and redirects standard `package log` output to a new zap logger. It returns a deferrable function, for calling zap.Logger.Sync at program termination.
func NewZapLogger ¶
func NewZapLogger(opts *Options) (*zap.Logger, zap.AtomicLevel)
NewZapLogger configures a zap.Logger for use in container based environments ERROR level logs are written to stderr and all other levels are written to stdout Useful in Kubernetes where stderr & stdout are interpreted as ERROR & INFO level logs respectively opts.Debug controls the loggers output. Human readable when true; JSON when false.