log

package
v0.0.0-...-5fda629 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2022 License: MulanPSL-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FieldsPrefix = "prefix"
)

Variables

This section is empty.

Functions

func Close

func Close() error

func Debugf

func Debugf(format string, args ...interface{})

func Errorf

func Errorf(format string, args ...interface{})

func Fatalf

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

func Infof

func Infof(format string, args ...interface{})

func InitFlags

func InitFlags(flags *pflag.FlagSet)

func InitViper

func InitViper(flags *viper.Viper)

func Initialize

func Initialize(opts ...option)

func NewLogger

func NewLogger(prefix string) *logrus.Entry

func OptionConfig

func OptionConfig(opts ...option)

func ViperConfig

func ViperConfig(flags *viper.Viper)

func Warnf

func Warnf(format string, args ...interface{})

func WithFormat

func WithFormat(ft string) option

func WithPrefix

func WithPrefix(px string) option

Types

type Logger

type Logger interface {
	Debugf(format string, args ...interface{})
	Infof(format string, args ...interface{})
	Warnf(format string, args ...interface{})
	Errorf(format string, args ...interface{})
	Fatalf(format string, args ...interface{})
}

Jump to

Keyboard shortcuts

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