commonlog

package
v21.11.1 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// LogLevelFnMap is a map between loglevel and log functions from logrus
	LogLevelFnMap = map[logrus.Level]func(args ...interface{}){
		logrus.TraceLevel: logrus.Trace,
		logrus.DebugLevel: logrus.Debug,
		logrus.InfoLevel:  logrus.Info,
		logrus.WarnLevel:  logrus.Warn,
		logrus.ErrorLevel: logrus.Error,
	}
)

Functions

This section is empty.

Types

type MyFormatter

type MyFormatter struct {
	logrus.TextFormatter
	// contains filtered or unexported fields
}

MyFormatter ...

func GetDefaultFormatter

func GetDefaultFormatter() *MyFormatter

GetDefaultFormatter returns the default formatter used by all Safescale modules

func (*MyFormatter) Format

func (f *MyFormatter) Format(entry *logrus.Entry) ([]byte, error)

Format ...

Jump to

Keyboard shortcuts

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