logutil

package
v0.0.0-...-c6ea6ab Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2021 License: LGPL-3.0 Imports: 4 Imported by: 16

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultLogger = &logrus.Logger{
		Out: os.Stdout,
		Formatter: &logrusutil.ConsoleLogFormatter{
			TimestampFormat: timestampFormat,
		},
		Hooks: make(logrus.LevelHooks),
		Level: logrus.InfoLevel,
	}
)

Functions

This section is empty.

Types

type LevelLogger

type LevelLogger interface {
	Debug(...interface{})
	Debugf(string, ...interface{})
	Debugln(...interface{})

	Info(...interface{})
	Infof(string, ...interface{})
	Infoln(...interface{})

	Warn(...interface{})
	Warnf(string, ...interface{})
	Warnln(...interface{})

	Error(...interface{})
	Errorf(string, ...interface{})
	Errorln(...interface{})
}

func GetLevelLogger

func GetLevelLogger(inj inject.Injector) LevelLogger

GetLevelLogger get LevelLogger instance from injector

type StdLogger

type StdLogger interface {
	Print(...interface{})
	Printf(string, ...interface{})
	Println(...interface{})

	Fatal(...interface{})
	Fatalf(string, ...interface{})
	Fatalln(...interface{})

	Panic(...interface{})
	Panicf(string, ...interface{})
	Panicln(...interface{})
}

func GetStdLogger

func GetStdLogger(inj inject.Injector) StdLogger

GetStdLogger get StdLogger instance from injector

Jump to

Keyboard shortcuts

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