logging

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetKnownLoggers

func GetKnownLoggers() []*logrus.Logger

GetKnownLoggers returns all loggers currently configured

func GetLogger

func GetLogger(pkgName string) *logrus.Logger

GetLogger either returns an existing logger for package specified or creates a new one

Types

type LogFormatter

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

LogFormatter applies consistent formatting to every message

func (*LogFormatter) Format

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

Format satisfies logrus' Format interface while staying flexible

type LogWriter

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

LogWriter struct used to provide an io.Writer

func GetLogWriter

func GetLogWriter(pkgName string, level logrus.Level) *LogWriter

GetLogWriter returns an io.Writer that maps to the named logger at the specified level

func (*LogWriter) Write

func (logWriter *LogWriter) Write(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

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