Documentation ¶
Index ¶
- Variables
- func GetLogger(ctx context.Context) *zap.Logger
- func MustNewCoreWithLevelAbove(level zapcore.Level, location string, enc zapcore.Encoder) zapcore.Core
- func MustNewCoreWithLevelOnly(level zapcore.Level, location string, enc zapcore.Encoder) zapcore.Core
- func NewSink(u *url.URL) (zap.Sink, error)
- func ToContext(ctx context.Context, logger *zap.Logger) context.Context
- func With(ctx context.Context, fields ...zapcore.Field) context.Context
- type Writer
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func GetLogger ¶ added in v1.0.25
GetLogger takes the call-scoped Logger from grpc_zap middleware.
It always returns a Logger that has all the grpc_ctxtags updated.
func MustNewCoreWithLevelAbove ¶
func MustNewCoreWithLevelAbove(level zapcore.Level, location string, enc zapcore.Encoder) zapcore.Core
MustNewCoreWithLevelAbove create core handle level >= specified level
func MustNewCoreWithLevelOnly ¶
func MustNewCoreWithLevelOnly(level zapcore.Level, location string, enc zapcore.Encoder) zapcore.Core
MustNewCoreWithLevelOnly create core only handle specified level
Types ¶
Click to show internal directories.
Click to hide internal directories.