logger

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2024 License: Apache-2.0 Imports: 4 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Logf

func Logf(ll LogLevel, format string, args ...interface{})

func Logln

func Logln(ll LogLevel, args ...interface{})

func SetOutput

func SetOutput(out io.Writer)

func SetOutputLevel

func SetOutputLevel(ll LogLevel)

func SetReportCaller

func SetReportCaller(include bool)

Types

type LogEntry

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

func GetCustomLogEntry

func GetCustomLogEntry(pc uintptr, file string, line int, ok bool) LogEntry

func (*LogEntry) Logf

func (le *LogEntry) Logf(ll LogLevel, format string, args ...interface{})

func (*LogEntry) Logln

func (le *LogEntry) Logln(ll LogLevel, args ...interface{})

type LogLevel

type LogLevel = logrus.Level
const (
	PanicLevel LogLevel = iota
	// FatalLevel level. Logs and then calls `logger.Exit(1)`. It will exit even if the
	// logging level is set to Panic.
	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
	// WarnLevel level. Non-critical entries that deserve eyes.
	WarnLevel
	// InfoLevel level. General operational entries about what's going on inside the
	// application.
	InfoLevel
	// DebugLevel level. Usually only enabled when debugging. Very verbose logging.
	DebugLevel
	// TraceLevel level. Designates finer-grained informational events than the Debug.
	TraceLevel
)

Jump to

Keyboard shortcuts

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