aurestlogging

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2024 License: MIT Imports: 6 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug added in v0.8.0

func Info added in v0.8.0

func NewWithOptions added in v0.8.0

func Warn added in v0.8.0

Types

type RequestLoggingImpl

type RequestLoggingImpl struct {
	Wrapped aurestclientapi.Client
	Options RequestLoggingOptions
}

func (*RequestLoggingImpl) Perform

func (c *RequestLoggingImpl) Perform(ctx context.Context, method string, requestUrl string, requestBody interface{}, response *aurestclientapi.ParsedResponse) error

type RequestLoggingOptions added in v0.8.0

type RequestLoggingOptions struct {
	BeforeRequest func(ctx context.Context) auloggingapi.LeveledLoggingImplementation
	Success       func(ctx context.Context) auloggingapi.LeveledLoggingImplementation
	Failure       func(ctx context.Context) auloggingapi.LeveledLoggingImplementation
}

RequestLoggingOptions allows overriding the log functions used.

This allows easily changing the log level when setting up request logging.

important: do not cache the LeveledLoggingImplementation, create one each time, or some loggers may use cached values.

Jump to

Keyboard shortcuts

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