options

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option interface {
	Set(opt *Options) error
}

func Format

func Format(fmt logrus.Formatter) Option

func GlobalField added in v1.3.0

func GlobalField(key string, value interface{}) Option

func GlobalFields added in v1.3.0

func GlobalFields(fields map[string]interface{}) Option

func Level

func Level(levelFunc func() logrus.Level) Option

func Path

func Path(path string) Option

func Writer

func Writer(output io.Writer) Option

type Options

type Options struct {
	LevelFunc    func() logrus.Level
	Formatter    logrus.Formatter
	Output       io.Writer
	Path         string
	GlobalFields map[string]interface{}
}

func Default

func Default() *Options

Jump to

Keyboard shortcuts

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