logging

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2021 License: MPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddWalletIDToContext

func AddWalletIDToContext(ctx context.Context, walletID uuid.UUID)

AddWalletIDToContext adds wallet id to context

func FromContext added in v0.5.1

func FromContext(ctx context.Context) *zerolog.Logger

FromContext - retrieves logger from context or gets a new logger if not present

func Logger added in v0.5.0

func Logger(ctx context.Context, prefix string) *zerolog.Logger

Logger - get a logger a little easier for payments

func ReportProgress added in v0.4.0

func ReportProgress(ctx context.Context, progressDuration time.Duration) chan Progress

ReportProgress - goroutine watching for Progress updates for logging

func SetupLogger

func SetupLogger(ctx context.Context) (context.Context, *zerolog.Logger)

SetupLogger - helper to setup a logger and associate with context

func SetupLoggerWithLevel added in v0.4.0

func SetupLoggerWithLevel(ctx context.Context, level zerolog.Level) (context.Context, *zerolog.Logger)

SetupLoggerWithLevel - helper to setup a logger and associate with context with a given log level

func SubmitProgress added in v0.4.0

func SubmitProgress(ctx context.Context, processed, total int)

SubmitProgress - helper to log progress

Types

type Progress added in v0.4.0

type Progress struct {
	Processed int
	Total     int
}

Progress - type to store the incremental progress of a task

Jump to

Keyboard shortcuts

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