logging

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2022 License: MIT Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	LevelInfo  = "info"
	LevelError = "error"
	LevelWarn  = "warn"
	LevelDebug = "debug"
)

Variables

This section is empty.

Functions

func Debug

func Debug(ctx context.Context, fmt string, args ...interface{})

func Error

func Error(ctx context.Context, fmt string, args ...interface{})

func Info

func Info(ctx context.Context, fmt string, args ...interface{})

func LogrusModule

func LogrusModule() fx.Option

func NewInMemoryLogger

func NewInMemoryLogger() *inMemoryLogger

func NewLogrusLogger

func NewLogrusLogger() *logrusLogger

func SetDefaultLogger

func SetDefaultLogger(l Logger)

func Warn

func Warn(ctx context.Context, fmt string, args ...interface{})

Types

type Logger

type Logger interface {
	Info(ctx context.Context, fmt string, args ...interface{})
	Error(ctx context.Context, fmt string, args ...interface{})
	Warn(ctx context.Context, fmt string, args ...interface{})
	Debug(ctx context.Context, fmt string, args ...interface{})
	WithFields(map[string]interface{}) Logger
}

func DefaultLogger

func DefaultLogger() Logger

func WithFields

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

Jump to

Keyboard shortcuts

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