util

package
v0.0.0-...-354f3a1 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitLogger

func InitLogger(logger Logger)

Types

type LogLevel

type LogLevel int

* LogLevel *

const (
	DebugLevel LogLevel = iota - 1
	InfoLevel
	WarnLevel
	ErrorLevel
)

type Logger

type Logger interface {
	Debug(msg string, keysAndValues ...interface{})
	Info(msg string, keysAndValues ...interface{})
	Error(err error, msg string, keysAndValues ...interface{})
	Fatal(err error, msg string, keysAndValues ...interface{})
	WithValues(keysAndValues ...interface{}) Logger
}

* Logger *

func GetLogger

func GetLogger() Logger

type LoggerConfig

type LoggerConfig interface {
	Level() LogLevel
}

* LoggerConfig *

func NewLoggerConfig

func NewLoggerConfig(level LogLevel) (LoggerConfig, error)

Jump to

Keyboard shortcuts

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