Documentation

Index

Constants

This section is empty.

Variables

View Source
var Loggers map[string]*logrus.Logger

Loggers is the runtime map of logger name to logger object

Functions

func NewLogger

func NewLogger(name string) *logrus.Logger

NewLogger is the constructor for a new Logger object with the given name

func SetLevel

func SetLevel(level logrus.Level)

SetLevel sets the given level for all current Loggers

Types

type TextFormatter

type TextFormatter struct {
	LoggerName string
	logrus.TextFormatter
}

TextFormatter extends the standard logrus TextFormatter and adds a field to specify the logger's name

func (*TextFormatter) Format

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

Format formats a log entry onto bytes

Source Files