logger

package
v0.0.0-...-c98e9ca Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GlobalLogger = logrus.New()

GlobalLogger is the global logger

Functions

func ErrorFields

func ErrorFields(message string, fields Fields)

ErrorFields is a helper for logging fields to the global logger

func SetLogLevel

func SetLogLevel(level string)

SetLogLevel sets the log level to the given level

Types

type CustomLogger

type CustomLogger struct {
	// contains filtered or unexported fields
}

CustomLogger is a wrapper object to logrus

func NewCustomLogger

func NewCustomLogger(prefix string) *CustomLogger

NewCustomLogger creates a new custom logger with the given prefix

func (*CustomLogger) Debug

func (c *CustomLogger) Debug(message string)

Debug level message

func (*CustomLogger) DebugFields

func (c *CustomLogger) DebugFields(message string, fields Fields)

DebugFields - message with fields

func (*CustomLogger) Debugf

func (c *CustomLogger) Debugf(message string, args ...interface{})

Debugf - formatted message

func (*CustomLogger) Error

func (c *CustomLogger) Error(message string)

Error level message

func (*CustomLogger) ErrorFields

func (c *CustomLogger) ErrorFields(message string, fields Fields)

ErrorFields - message with fields

func (*CustomLogger) Errorf

func (c *CustomLogger) Errorf(message string, args ...interface{})

Errorf - formatted message

func (*CustomLogger) Fatal

func (c *CustomLogger) Fatal(message string)

Fatal level message

func (*CustomLogger) FatalFields

func (c *CustomLogger) FatalFields(message string, fields Fields)

FatalFields - message with fields

func (*CustomLogger) Fatalf

func (c *CustomLogger) Fatalf(message string, args ...interface{})

Fatalf - formatted message

func (*CustomLogger) Info

func (c *CustomLogger) Info(message string)

Info level message

func (*CustomLogger) InfoFields

func (c *CustomLogger) InfoFields(message string, fields Fields)

InfoFields - message with fields

func (*CustomLogger) Infof

func (c *CustomLogger) Infof(message string, args ...interface{})

Infof - formatted message

func (*CustomLogger) Panic

func (c *CustomLogger) Panic(message string)

Panic level message

func (*CustomLogger) PanicFields

func (c *CustomLogger) PanicFields(message string, fields Fields)

PanicFields - message with fields

func (*CustomLogger) Panicf

func (c *CustomLogger) Panicf(message string, args ...interface{})

Panicf - formatted message

func (*CustomLogger) Warn

func (c *CustomLogger) Warn(message string)

Warn level message

func (*CustomLogger) WarnFields

func (c *CustomLogger) WarnFields(message string, fields Fields)

WarnFields - message with fields

func (*CustomLogger) Warnf

func (c *CustomLogger) Warnf(message string, args ...interface{})

Warnf - formatted message

type Fields

type Fields map[string]interface{}

Fields is used by the customLogger object to output fields along with a message

Jump to

Keyboard shortcuts

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