logger

package
v0.0.0-...-a0c4ee5 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(msg string, params ...interface{})

func Error

func Error(msg string, params ...interface{})

func Fatal

func Fatal(msg string, params ...interface{})

func Info

func Info(msg string, params ...interface{})

func Init

func Init(logLevel Level) error

Initialize the Logger

func InitWithFields

func InitWithFields(logLevel Level, fields map[string]interface{}) error

Initialize the Logger with fields

func Println

func Println(v ...interface{})

func Warn

func Warn(msg string, params ...interface{})

func WithFields

func WithFields(fields map[string]interface{})

Types

type Level

type Level uint32
const (
	// PanicLevel level, highest level of severity. Logs and then calls panic with the
	// message passed to Debug, Info, ...
	PanicLevel Level = 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
)

type Logger

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

Jump to

Keyboard shortcuts

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