log

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Levels = []string{"debug", "info", "warn", "error", "dpanic", "panic", "fatal"}

Functions

func NewLogger

func NewLogger(opts ...Option) (*zap.Logger, error)

Types

type Fields

type Fields []zap.Field

func FieldsFromImcomingContext

func FieldsFromImcomingContext(ctx context.Context) Fields

func FieldsFromOutgoingContext

func FieldsFromOutgoingContext(ctx context.Context) Fields

func (Fields) AddFields

func (fs Fields) AddFields(fields ...zap.Field) Fields

type Option

type Option func(*options)

func WithLevel

func WithLevel(level string) Option

func WithServiceContext

func WithServiceContext(service, version string) Option

Jump to

Keyboard shortcuts

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