log

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Console

func Console()

Console sets output to be human-readable

func CopyContext

func CopyContext(ctx context.Context, dst context.Context) context.Context

CopyContext returns a context derived from dst that contains the eventual logging keys that are contained in ctx

func Fatal

func Fatal(v ...interface{})

func Fatalf

func Fatalf(format string, v ...interface{})

func Logger

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

Logger returns a logger that will print fields previously added to the context

func Panic

func Panic(v ...interface{})

func Panicf

func Panicf(msg string, v ...interface{})

func Print

func Print(v ...interface{})

Print logs at Info level

func Printf

func Printf(format string, v ...interface{})

Printf logs at Info level

func Println

func Println(v ...interface{})

func Structured

func Structured()

Structured sets output to be JSON encoded

func With

func With(ctx context.Context, key string, value interface{}) context.Context

With adds a key=value field to the returned context

func WithFields

func WithFields(ctx context.Context, fields ...zapcore.Field) context.Context

WithFields adds fields to the returned context

Types

This section is empty.

Jump to

Keyboard shortcuts

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