logging

package
v0.0.0-...-d384908 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoggerFromContext

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

LoggerFromContext returns the logger from the context

func NewLogger

func NewLogger(level string, opts ...zap.Option) (*zap.SugaredLogger, zap.AtomicLevel)

NewLogger returns a new instance of logger

func NewLoggerFromConfig

func NewLoggerFromConfig(configYaml string, levelOverride string, opts ...zap.Option) (*zap.SugaredLogger, zap.AtomicLevel, error)

NewLoggerFromConfig returns a new instance of logger from Config

func WithLogger

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

WithLogger add the current logger to context and returns the context

Types

This section is empty.

Jump to

Keyboard shortcuts

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