log

package
v1.4.6 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: 4 Imported by: 13

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// L accesses the current logger from the context
	L = loggerFromContext
)

Functions

func SetFormatting

func SetFormatting(format Formatting)

func SetLevel

func SetLevel(level string)

func WithLogField

func WithLogField(ctx context.Context, key, value string) context.Context

WithLogField adds the specified field to the logger in the context

func WithLogger

func WithLogger(ctx context.Context, logger *logrus.Entry) context.Context

WithLogger adds the specified logger to the context

Types

type Formatting

type Formatting struct {
	DisableColor       bool
	ForceColor         bool
	TimestampFormat    string
	UTC                bool
	IncludeCodeInfo    bool
	JSONEnabled        bool
	JSONTimestampField string
	JSONLevelField     string
	JSONMessageField   string
	JSONFuncField      string
	JSONFileField      string
}

Jump to

Keyboard shortcuts

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