log

package
v1.2.16 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 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()
}

Jump to

Keyboard shortcuts

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