logging

package
v0.0.0-...-d386c04 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 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 Logger

type Logger interface {
	// Error creates a log entry that includes a Key/ErrorValue pair.
	Error(args ...interface{})
	// Warn creates a log entry that includes a Key/WarnValue pair.
	Warn(args ...interface{})
	// Info creates a log entry that includes a Key/InfoValue pair.
	Info(args ...interface{})
	// Debug creates a log entry that includes a Key/DebugValue pair.
	Debug(args ...interface{})

	// Errorw creates a log entry that includes a Key/ErrorValue pair.
	Errorw(msg string, args ...interface{})
	// Warnw creates a log entry that includes a Key/WarnValue pair.
	Warnw(msg string, args ...interface{})
	// Infow creates a log entry that includes a Key/InfoValue pair.
	Infow(msg string, args ...interface{})
	// Debugw creates a log entry that includes a Key/DebugValue pair.
	Debugw(msg string, args ...interface{})

	Errorf(format string, args ...interface{})
	Warnf(format string, args ...interface{})
	Infof(format string, args ...interface{})
	Debugf(format string, args ...interface{})

	// With returns a new Logger with given args as default Key/Value pairs.
	With(args ...interface{}) Logger
}

Logger is the logger abstraction. It largely follows zap structure.

func New

func New(provider configuration.Provider) (Logger, error)

func NewNoop

func NewNoop() (Logger, error)

func NewZap

func NewZap(conf *config.Config) (Logger, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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