logging

package
v0.0.0-...-2502259 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLoggerWithCore

func NewLoggerWithCore(coreLogger *zap.Logger) *builtinLogger

NewLoggerWithCore creates an abstracted logger

func NewTest

func NewTest(t testing.TB) *builtinLogger

NewTest returns a Logger instance with a dummy core log provided by the core log library

Types

type Logger

type Logger interface {
	Named(name string) Logger
	With(args ...interface{}) Logger
	Debug(msg string, keysAndValues ...interface{})
	Info(msg string, keysAndValues ...interface{})
	Error(msg string, keysAndValues ...interface{})
	Warn(msg string, keysAndValues ...interface{})
}

Logger logs application events

func NewLogger

func NewLogger(conf *config.Values) (Logger, error)

NewLogger creates a logging instance

type Mocked

type Mocked struct {
	mock.Mock
}

Mocked allows mocking log methods

func (*Mocked) Debug

func (l *Mocked) Debug(msg string, keysAndValues ...interface{})

func (*Mocked) Error

func (l *Mocked) Error(msg string, keysAndValues ...interface{})

func (*Mocked) Info

func (l *Mocked) Info(msg string, keysAndValues ...interface{})

func (*Mocked) Named

func (l *Mocked) Named(name string) *builtinLogger

func (*Mocked) Warn

func (l *Mocked) Warn(msg string, keysAndValues ...interface{})

func (*Mocked) With

func (l *Mocked) With(args ...interface{}) *builtinLogger

Jump to

Keyboard shortcuts

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