Documentation ¶
Index ¶
- Variables
- func Get(ctx context.Context) *zap.Logger
- func New(config Config) *zap.Logger
- func NewForTesting(t *testing.T) *zap.Logger
- func With(ctx context.Context, fields ...zapcore.Field) context.Context
- func WithLogger(ctx context.Context, logger *zap.Logger) context.Context
- type Color
- type Config
- type Format
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultEncoderConfig = func() zapcore.EncoderConfig { ec := zap.NewProductionEncoderConfig() ec.EncodeTime = iso8601MicroTimeEncoder return ec }()
DefaultEncoderConfig is the default value of zap.EncoderConfig that we use when creating top-level loggers
Functions ¶
func New ¶
New creates a top-level logger.
The caller must call the returned cleanup function after using the logger.
func NewForTesting ¶
NewForTesting creates a logger for use in unit tests.
The caller must call the returned cleanup function after using the logger.
Types ¶
Click to show internal directories.
Click to hide internal directories.