logging

package
v0.0.0-...-7907c65 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: MIT Imports: 5 Imported by: 16

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 ...any)
	// Warn creates a log entry that includes a Key/WarnValue pair.
	Warn(args ...any)
	// Info creates a log entry that includes a Key/InfoValue pair.
	Info(args ...any)
	// Debug creates a log entry that includes a Key/DebugValue pair.
	Debug(args ...any)

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

	Errorf(format string, args ...any)
	Warnf(format string, args ...any)
	Infof(format string, args ...any)
	Debugf(format string, args ...any)

	// With returns a new Logger with given args as default Key/Value pairs.
	With(args ...any) 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