Documentation ¶
Index ¶
- func ContextWithLogger(ctx context.Context, logger *zap.SugaredLogger) context.Context
- func LoggerFromContext(ctx context.Context) (*zap.SugaredLogger, bool)
- func LoggerWithTraceFields(ctx context.Context, logger *zap.SugaredLogger) *zap.SugaredLogger
- func NewLogger(envName string, debug bool) *zap.Logger
- func NewStdlibWrappedLogger(ctx context.Context, logger *zap.SugaredLogger) *log.Logger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContextWithLogger ¶
func LoggerFromContext ¶
func LoggerFromContext(ctx context.Context) (*zap.SugaredLogger, bool)
func LoggerWithTraceFields ¶
func LoggerWithTraceFields(ctx context.Context, logger *zap.SugaredLogger) *zap.SugaredLogger
func NewLogger ¶
Creates a zap logger or dies trying. (No, seriously, it will log.Fatal() if it fails). The caller is responsible for calling `defer logger.Sync()` after initializing.
func NewStdlibWrappedLogger ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.