log

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2022 License: Apache-2.0 Imports: 1 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(msg string)

func Debugf

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

func Error

func Error(msg string)

func Errorf

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

func Info

func Info(msg string)

func Infof

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

func SetLogger

func SetLogger(l LoggerInterface)

SetLogger changes the global logger to the one provided.

Types

type Fields

type Fields map[string]interface{}

Fields type, used to pass to `WithFields`.

type LoggerInterface

type LoggerInterface interface {
	Errorf(format string, args ...interface{})
	Infof(format string, args ...interface{})
	Debugf(format string, args ...interface{})
	Error(msg string)
	Info(msg string)
	Debug(msg string)
	WithFields(fields Fields) LoggerInterface
	WithError(err error) LoggerInterface
}

LoggerInterface is the interface used to abstract logging.

func NewLogrusWrapper

func NewLogrusWrapper(l *logrus.Logger) LoggerInterface

func WithError

func WithError(err error) LoggerInterface

func WithFields

func WithFields(fields Fields) LoggerInterface

Jump to

Keyboard shortcuts

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