logger

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2020 License: Apache-2.0 Imports: 3 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	// PanicLevel level, highest level of severity. Logs and then calls panic with the
	// message passed to Debug, Info, ...
	PanicLevel = logrus.PanicLevel
	// FatalLevel level. Logs and then calls `logger.Exit(1)`. It will exit even if the
	// logging level is set to Panic.
	FatalLevel = logrus.FatalLevel
	// ErrorLevel level. Logs. Used for errors that should definitely be noted.
	// Commonly used for hooks to send errors to an error tracking service.
	ErrorLevel = logrus.ErrorLevel
	// WarnLevel level. Non-critical entries that deserve eyes.
	WarnLevel = logrus.WarnLevel
	// InfoLevel level. General operational entries about what's going on inside the
	// application.
	InfoLevel = logrus.InfoLevel
	// DebugLevel level. Usually only enabled when debugging. Very verbose logging.
	DebugLevel = logrus.DebugLevel
	// TraceLevel level. Designates finer-grained informational events than the Debug.
	TraceLevel = logrus.TraceLevel
)

Variables

View Source
var CurrentLevel = InfoLevel

Functions

func LogDebugWithLevel

func LogDebugWithLevel(msg string, level logrus.Level, args ...interface{})

func LogError

func LogError(msg string, err error, args ...map[string]interface{})

func LogErrorWithLevel

func LogErrorWithLevel(msg string, err error, level logrus.Level, args ...map[string]interface{})

func LogInfo

func LogInfo(msg string, args ...interface{})

func LogInfoWithLevel

func LogInfoWithLevel(msg string, level logrus.Level, args ...interface{})

func LogPanic

func LogPanic(msg string, err error, args ...map[string]interface{})

func LogPanicWithLevel

func LogPanicWithLevel(msg string, err error, level logrus.Level, args ...map[string]interface{})

func LogPrint

func LogPrint(msg string)

func LogStringAsError

func LogStringAsError(msg string)

func LogTraceWithLevel

func LogTraceWithLevel(msg string, level logrus.Level, args ...interface{})

func LogWarnWithLevel

func LogWarnWithLevel(msg string, level logrus.Level, args ...interface{})

func SetLogLevel

func SetLogLevel(level string)

Types

This section is empty.

Jump to

Keyboard shortcuts

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