logger

package
v0.0.0-...-a1224c5 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitLog

func InitLog(env string)

InitLog override default config

func InitWithOptions

func InitWithOptions(cnf ...CallLogOption)

func Set

func Set(newLog Logger)

Types

type CallLogOption

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

func WithConfigEncoding

func WithConfigEncoding(encoding string) CallLogOption

func WithConfigLevel

func WithConfigLevel(level string) CallLogOption

type Logger

type Logger interface {
	Infof(template string, args ...interface{})
	Infow(msg string, keysAndValues ...interface{})
	Info(args ...interface{})

	Debugf(template string, args ...interface{})
	Debugw(msg string, keysAndValues ...interface{})
	Debug(args ...interface{})

	Warnf(template string, args ...interface{})
	Warnw(msg string, keysAndValues ...interface{})
	Warn(args ...interface{})

	Errorf(template string, args ...interface{})
	Errorw(msg string, keysAndValues ...interface{})
	Error(args ...interface{})

	Panicf(template string, args ...interface{})
	Panicw(msg string, keysAndValues ...interface{})
	Panic(args ...interface{})

	Fatalf(template string, args ...interface{})
	Fatalw(msg string, keysAndValues ...interface{})
	Fatal(args ...interface{})

	Sync() error
}

func Log

func Log() Logger

Jump to

Keyboard shortcuts

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