logger

package
v0.0.0-...-9b703e0 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2020 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// LevelTrace level.
	LevelTrace gologger.Level = gologger.LevelTrace
	// LevelDebug level.
	LevelDebug gologger.Level = gologger.LevelDebug
	// LevelInfo level.
	LevelInfo gologger.Level = gologger.LevelInfo
	// LevelWarn level.
	LevelWarn gologger.Level = gologger.LevelWarn
	// LevelError level.
	LevelError gologger.Level = gologger.LevelError
	// LevelCritical level.
	LevelCritical gologger.Level = gologger.LevelCritical
	// LevelFatal level.
	LevelFatal gologger.Level = gologger.LevelFatal
	// LevelNone level.
	LevelNone gologger.Level = gologger.LevelNone
)
View Source
var (
	// TRACE logger.
	TRACE *gologger.LevelLogger
	// DEBUG logger.
	DEBUG *gologger.LevelLogger
	// INFO logger.
	INFO *gologger.LevelLogger
	// WARN logger.
	WARN *gologger.LevelLogger
	// ERROR logger.
	ERROR *gologger.LevelLogger
	// CRITICAL logger.
	CRITICAL *gologger.LevelLogger
	// FATAL logger
	FATAL *gologger.LevelLogger
)
View Source
var LevelMatches = map[string]gologger.Level{
	"TRACE":    gologger.LevelTrace,
	"DEBUG":    gologger.LevelDebug,
	"INFO":     gologger.LevelInfo,
	"WARN":     gologger.LevelWarn,
	"ERROR":    gologger.LevelError,
	"CRITICAL": gologger.LevelCritical,
	"FATAL":    gologger.LevelFatal,
	"NONE":     gologger.LevelNone,
}

LevelMatches is a map that matches string level to logger level constants.

Functions

func SetLogFile

func SetLogFile(path string) error

SetLogFile sets the LogHandle to a io.writer created for the file behind the given file path. Will append to this file.

func SetLogFlag

func SetLogFlag(flag int)

SetLogFlag sets global log flag used in package.

func SetLogThreshold

func SetLogThreshold(level gologger.Level)

SetLogThreshold establishes a threshold where anything matching or above will be logged.

func SetStdoutThreshold

func SetStdoutThreshold(level gologger.Level)

SetStdoutThreshold establishes a threshold where anything matching or above will be output.

Types

This section is empty.

Jump to

Keyboard shortcuts

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