logging

package
v0.0.0-...-f003305 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: MPL-2.0 Imports: 11 Imported by: 28

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

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

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

func Logger

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

Logger - get a logger a little easier for payments

func ReportProgress

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

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

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

SubmitProgress - helper to log progress

func UpholdReportProgress

func UpholdReportProgress(ctx context.Context, progressDuration time.Duration) chan UpholdProgressSet

UpholdReportProgress - goroutine watching for UpholdProgress updates for logging

func UpholdSubmitProgress

func UpholdSubmitProgress(ctx context.Context, progressSet UpholdProgressSet)

UpholdSubmitProgress - helper to log progress

Types

type Progress

type Progress struct {
	Processed int
	Total     int
}

Progress - type to store the incremental progress of a task

type UpholdProgress

type UpholdProgress struct {
	Message string
	Count   int
}

UpholdProgress - type to store the incremental progress of an Uphold transaction set

type UpholdProgressSet

type UpholdProgressSet struct {
	Progress []UpholdProgress
}

UpholdProgressSet - set of progress updates

Jump to

Keyboard shortcuts

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