logging

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetLogger

func GetLogger(name string) *logrus.Logger

Create a new logger with the given name

func SetGlobalLogLevel

func SetGlobalLogLevel(level logrus.Level)

Set the log level. Note: this ONLY affects loggers created using the GetLogger function AFTER this function has been called. Therefore, you need to call this as early in the life of your CLI app as possible!

Types

type TextFormatterWithBinName added in v0.7.0

type TextFormatterWithBinName struct {
	Name          string
	TextFormatter logrus.TextFormatter
}

TextFormatterWithBinName is a logrus formatter that prefixes the binary name to the log output.

func (*TextFormatterWithBinName) Format added in v0.7.0

func (formatter *TextFormatterWithBinName) Format(entry *logrus.Entry) ([]byte, error)

Jump to

Keyboard shortcuts

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