logger

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2018 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// LevelTrace level.
	LevelTrace = gologger.LevelTrace
	// LevelDebug level.
	LevelDebug = gologger.LevelDebug
	// LevelInfo level.
	LevelInfo = gologger.LevelInfo
	// LevelWarn level.
	LevelWarn = gologger.LevelWarn
	// LevelError level.
	LevelError = gologger.LevelError
	// LevelCritical level.
	LevelCritical = gologger.LevelCritical
	// LevelFatal level.
	LevelFatal = gologger.LevelFatal
	// LevelNone level.
	LevelNone = 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