Version: v0.1.0 Latest Latest

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

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




This section is empty.


This section is empty.


This section is empty.


type Config

type Config interface {
	// Level returns the configured log level.
	Level() string

	// File returns the configured log file.
	File() string

	// Format returns the configured log format.
	Format() string

Config provides the configuration for a logger.

type Logger

type Logger interface {
	WithField(key string, value interface{}) Logger
	WithFields(fields map[string]interface{}) Logger
	WithError(err error) Logger

	Debug(args ...interface{})
	Debugln(args ...interface{})
	Debugf(format string, args ...interface{})

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

	Print(args ...interface{})
	Println(args ...interface{})
	Printf(format string, args ...interface{})

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

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

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

	V(l int) bool

Logger implements grpc's LoggerV2 interface while supporting structured logging by implementing an interface similar to logrus' FieldLogger or apex's Interface.


type NullLogger

type NullLogger struct{}

func NewNullLogger

func NewNullLogger() NullLogger

func (NullLogger) Debug

func (l NullLogger) Debug(...interface{})

func (NullLogger) Debugf

func (l NullLogger) Debugf(string, ...interface{})

func (NullLogger) Debugln

func (l NullLogger) Debugln(...interface{})

func (NullLogger) Error

func (l NullLogger) Error(...interface{})

func (NullLogger) Errorf

func (l NullLogger) Errorf(string, ...interface{})

func (NullLogger) Errorln

func (l NullLogger) Errorln(...interface{})

func (NullLogger) Fatal

func (l NullLogger) Fatal(...interface{})

func (NullLogger) Fatalf

func (l NullLogger) Fatalf(string, ...interface{})

func (NullLogger) Fatalln

func (l NullLogger) Fatalln(...interface{})

func (NullLogger) Info

func (l NullLogger) Info(...interface{})

func (NullLogger) Infof

func (l NullLogger) Infof(string, ...interface{})

func (NullLogger) Infoln

func (l NullLogger) Infoln(...interface{})

func (NullLogger) Print

func (l NullLogger) Print(...interface{})

func (NullLogger) Printf

func (l NullLogger) Printf(string, ...interface{})

func (NullLogger) Println

func (l NullLogger) Println(...interface{})

func (NullLogger) V

func (l NullLogger) V(level int) bool

func (NullLogger) Warning

func (l NullLogger) Warning(...interface{})

func (NullLogger) Warningf

func (l NullLogger) Warningf(string, ...interface{})

func (NullLogger) Warningln

func (l NullLogger) Warningln(...interface{})

func (NullLogger) WithError

func (l NullLogger) WithError(err error) Logger

func (NullLogger) WithField

func (l NullLogger) WithField(string, interface{}) Logger

func (NullLogger) WithFields

func (l NullLogger) WithFields(map[string]interface{}) Logger


Path Synopsis
Package mocklog is a generated GoMock package.
Package mocklog is a generated GoMock package.

Jump to

Keyboard shortcuts

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