zapex

package
v0.0.0-...-cba58af Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 31, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContextWithLogger

func ContextWithLogger(ctx context.Context, logger *zap.SugaredLogger) context.Context

func LoggerFromContext

func LoggerFromContext(ctx context.Context) (*zap.SugaredLogger, bool)

func LoggerWithTraceFields

func LoggerWithTraceFields(ctx context.Context, logger *zap.SugaredLogger) *zap.SugaredLogger

func NewLogger

func NewLogger(envName string, debug bool) *zap.Logger

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

func NewStdlibWrappedLogger(ctx context.Context, logger *zap.SugaredLogger) *log.Logger

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL