Help us shape the future of Go! Take the 2026 Go Developer Survey

logger

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2024 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Debugger bool   `yaml:"debugger"`
	Output   string `yaml:"output"`
}

type Logger

type Logger interface {
	Infoln(args ...interface{})
	Infof(format string, args ...interface{})
	Debugln(args ...interface{})
	Debugf(format string, args ...interface{})
	AddContext(key string, value string) Logger
	EnableDebugger()
}

func NewLogrusLogger

func NewLogrusLogger(config Config) (Logger, error)

func NewTestLogger

func NewTestLogger(t *testing.T) Logger

type LogrusEntry

type LogrusEntry struct {
	*logrus.Entry
}

func (LogrusEntry) AddContext

func (logger LogrusEntry) AddContext(key string, value string) Logger

func (LogrusEntry) EnableDebugger

func (logger LogrusEntry) EnableDebugger()

type LogrusLogger

type LogrusLogger struct {
	*logrus.Logger
}

func (LogrusLogger) AddContext

func (logger LogrusLogger) AddContext(key string, value string) Logger

func (LogrusLogger) EnableDebugger

func (logger LogrusLogger) EnableDebugger()

type TestLogger

type TestLogger struct {
	*testing.T
}

func (TestLogger) AddContext

func (logger TestLogger) AddContext(key string, value string) Logger

func (TestLogger) Debugf

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

func (TestLogger) Debugln

func (logger TestLogger) Debugln(args ...interface{})

func (TestLogger) EnableDebugger

func (logger TestLogger) EnableDebugger()

func (TestLogger) Infof

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

func (TestLogger) Infoln

func (logger TestLogger) Infoln(args ...interface{})

Jump to

Keyboard shortcuts

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