Help us shape the future of Go! Take the 2026 Go Developer Survey

logging

package
v3.13.3 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2026 License: MPL-2.0 Imports: 3 Imported by: 1

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

Jump to

Keyboard shortcuts

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