logger

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2023 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Setup

func Setup(level, format string)

Setup configures the logger.

Types

type RetryableHTTPWrapper

type RetryableHTTPWrapper struct {
	// contains filtered or unexported fields
}

RetryableHTTPWrapper wraps our logger and implements retryablehttp.LeveledLogger. The retry library we're using structured logging but sends fields as pairs of keys and values, so we need to adapt them to our logger.

func NewRetryableHTTPWrapper

func NewRetryableHTTPWrapper(logger zerolog.Logger) *RetryableHTTPWrapper

NewRetryableHTTPWrapper creates an implementation of the retryablehttp.LeveledLogger.

func (RetryableHTTPWrapper) Debug

func (l RetryableHTTPWrapper) Debug(msg string, keysAndValues ...interface{})

Debug starts a new message with debug level.

func (RetryableHTTPWrapper) Error

func (l RetryableHTTPWrapper) Error(msg string, keysAndValues ...interface{})

Error starts a new message with error level.

func (RetryableHTTPWrapper) Info

func (l RetryableHTTPWrapper) Info(msg string, keysAndValues ...interface{})

Info starts a new message with info level.

func (RetryableHTTPWrapper) Warn

func (l RetryableHTTPWrapper) Warn(msg string, keysAndValues ...interface{})

Warn starts a new message with warn level.

Jump to

Keyboard shortcuts

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