log

package
Version: v1.3.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	DebugLevel = "debug"
	InfoLevel  = "info"
	WarnLevel  = "warn"
	ErrorLevel = "error"
	PanicLevel = "panic"
)

Variables

This section is empty.

Functions

func Debug

func Debug(args ...interface{})

Debug Using:log.Debug("test")

func Debugf

func Debugf(template string, args ...interface{})

Debugf Using:log.Debugf("test:%s", err)

func Debugw

func Debugw(msg string, keysAndValues ...interface{})

Debugw Using:log.Debugw("test", "field1", "value1", "field2", "value2")

func Error

func Error(args ...interface{})

func Errorf

func Errorf(template string, args ...interface{})

func Errorw

func Errorw(msg string, keysAndValues ...interface{})

func Info

func Info(args ...interface{})

func Infof

func Infof(template string, args ...interface{})

func Infow

func Infow(msg string, keysAndValues ...interface{})

func SetLogger

func SetLogger(myLogger Logger)

func Sync

func Sync()

func Warn

func Warn(args ...interface{})

func Warnf

func Warnf(template string, args ...interface{})

func Warnw

func Warnw(msg string, keysAndValues ...interface{})

Types

type Logger

type Logger interface {
	// Debug Using:log.Debug("test")
	Debug(args ...interface{})

	// Debugf Using:log.Debugf("test:%s", err)
	Debugf(template string, args ...interface{})

	// Debugw Using:log.Debugw("test", "field1", "value1", "field2", "value2")
	Debugw(msg string, keysAndValues ...interface{})

	Info(args ...interface{})

	Infof(template string, args ...interface{})

	Infow(msg string, keysAndValues ...interface{})

	Warn(args ...interface{})

	Warnf(template string, args ...interface{})

	Warnw(msg string, keysAndValues ...interface{})

	Error(args ...interface{})

	Errorf(template string, args ...interface{})

	Errorw(msg string, keysAndValues ...interface{})

	Sync()
}

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL