logging

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2023 License: Apache-2.0 Imports: 3 Imported by: 22

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromContext

func FromContext(ctx context.Context) zerolog.Logger

func WithContext

func WithContext(ctx context.Context, opts Options) context.Context

func WithName added in v0.16.0

func WithName(ctx zerolog.Context, name string) zerolog.Context

Types

type Level

type Level int8
const (
	DebugLevel Level = iota
	InfoLevel
	WarnLevel
	ErrorLevel
	FatalLevel
	PanicLevel
	NoLevel
	Disabled

	TraceLevel Level = -1
)

func MustParseLevel added in v0.16.0

func MustParseLevel(input string) Level

func ParseLevel added in v0.16.0

func ParseLevel(input string) (Level, error)

func (Level) String added in v0.16.0

func (l Level) String() string

type Options

type Options struct {
	Writer io.Writer
	Level  Level
	Fields map[string]interface{}
}

Jump to

Keyboard shortcuts

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