logger

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debugf

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

func Errorf

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

func Fatalf

func Fatalf(format string, args ...interface{})

func Info

func Info(format string)

func Infof

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

func Panicf

func Panicf(format string, args ...interface{})

func SetLevel added in v0.3.0

func SetLevel(v Verbosity)

func SetLoggerImpl

func SetLoggerImpl(newLogger Logger)

SetLoggerImpl lets you override the Logger implementation. Calls are not thread-safe, so set this first thing.

func Warningf

func Warningf(format string, args ...interface{})

Types

type Logger

type Logger interface {
	Debugf(format string, args ...interface{})

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

	Info(format string)

	Warningf(format string, args ...interface{})

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

	Fatalf(format string, args ...interface{})

	Panicf(format string, args ...interface{})
}

type StandardGolangLogger

type StandardGolangLogger struct {
	VerbosityLevel Verbosity
}

func (*StandardGolangLogger) Debugf

func (l *StandardGolangLogger) Debugf(format string, args ...interface{})

func (*StandardGolangLogger) Errorf

func (l *StandardGolangLogger) Errorf(format string, args ...interface{})

func (*StandardGolangLogger) Fatalf

func (l *StandardGolangLogger) Fatalf(format string, args ...interface{})

func (*StandardGolangLogger) Info

func (l *StandardGolangLogger) Info(format string)

func (*StandardGolangLogger) Infof

func (l *StandardGolangLogger) Infof(format string, args ...interface{})

func (*StandardGolangLogger) Panicf

func (l *StandardGolangLogger) Panicf(format string, args ...interface{})

func (*StandardGolangLogger) Warningf

func (l *StandardGolangLogger) Warningf(format string, args ...interface{})

type Verbosity

type Verbosity int
const (
	DEBUG Verbosity = iota - 1
	INFO
	WARNING
	ERROR
	FATAL
	PANIC
)

func GetLevelFromString added in v0.3.0

func GetLevelFromString(s string) Verbosity

Jump to

Keyboard shortcuts

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