restylog

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Json    = "json"
	Default = "default"
)

Variables

This section is empty.

Functions

func RequestLogCallback

func RequestLogCallback(req *resty.RequestLog) error

func ResponseLogCallback

func ResponseLogCallback(res *resty.ResponseLog) error

func SetDebug

func SetDebug(c *resty.Client, debug bool) *resty.Client

func SetFormat

func SetFormat(format string)

func WriteLog

func WriteLog(ctx context.Context, name string, req *resty.Request, res *resty.Response, f ...Logging)

Types

type Logger

type Logger struct{}

func (*Logger) Debugf

func (l *Logger) Debugf(format string, v ...interface{})

func (*Logger) Errorf

func (l *Logger) Errorf(format string, v ...interface{})

func (*Logger) Warnf

func (l *Logger) Warnf(format string, v ...interface{})

type Logging

type Logging func(event *zerolog.Event) *zerolog.Event

Jump to

Keyboard shortcuts

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