log

package
v0.0.0-...-4043622 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TimeFormat = "2006-01-02T15:04:05.000Z07:00"
)

Variables

This section is empty.

Functions

func AddHook

func AddHook(hook logrus.Hook)

func Debug

func Debug(args ...interface{})

func Debugf

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

func Error

func Error(args ...interface{})

func Errorf

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

func Fatal

func Fatal(args ...interface{})

func Fatalf

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

func Info

func Info(args ...interface{})

func Infof

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

func Panic

func Panic(args ...interface{})

func Panicf

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

func RemoveHook

func RemoveHook(hook logrus.Hook)

func StandardLogger

func StandardLogger() *logrus.Logger

func Warn

func Warn(args ...interface{})

func Warnf

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

Types

type Logger

type Logger interface {
	WithField(key string, value interface{}) Logger
	WithFields(fields logrus.Fields) Logger
	WithContext(c *context.Context) Logger
	Data() logrus.Fields
	Time() time.Time
	Level() logrus.Level
	Logger() *logrus.Logger
	Message() string
	Info(args ...interface{})
	Debug(args ...interface{})
	Warn(args ...interface{})
	Error(args ...interface{})
	Panic(args ...interface{})
	Fatal(args ...interface{})
	Infof(format string, args ...interface{})
	Debugf(format string, args ...interface{})
	Warnf(format string, args ...interface{})
	Errorf(format string, args ...interface{})
	Panicf(format string, args ...interface{})
	Fatalf(format string, args ...interface{})
}

func CreateLogger

func CreateLogger() Logger

func WithContext

func WithContext(c *context.Context) Logger

func WithField

func WithField(key string, value interface{}) Logger

func WithFields

func WithFields(fields map[string]interface{}) Logger

Jump to

Keyboard shortcuts

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