logger

package
v0.0.0-...-612eec2 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(ctx context.Context, msg string, fields ...zap.Field)

Debug logs a message at DebugLevel.

func Error

func Error(ctx context.Context, msg string, fields ...zap.Field)

Error logs a message at ErrorLevel.

func Extract

func Extract(ctx context.Context) *zap.Logger

Extract takes the call-scoped Logger from context.

func Info

func Info(ctx context.Context, msg string, fields ...zap.Field)

Info logs a message at InfoLevel.

func New

func New(level string) (*zap.Logger, error)

New creates a new zap logger with the given log level.

func NewDiscard

func NewDiscard() *zap.Logger

NewDiscard creates logger which output to ioutil.Discard. This can be used for testing.

func ToContext

func ToContext(ctx context.Context, l *zap.Logger) context.Context

ToContext adds the zap.Logger into context.

func Warn

func Warn(ctx context.Context, msg string, fields ...zap.Field)

Warn logs a message at WarnLevel.

Types

This section is empty.

Jump to

Keyboard shortcuts

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