log

package
v1.0.18 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DebugLogger

type DebugLogger struct {
	Output io.Writer
}

func (DebugLogger) Log

func (l DebugLogger) Log(message string)

func (*DebugLogger) LogRequest

func (l *DebugLogger) LogRequest(request RequestInfo)

func (DebugLogger) LogResponse

func (l DebugLogger) LogResponse(response ResponseInfo)

type DefaultLogger

type DefaultLogger struct {
}

func (DefaultLogger) Log

func (l DefaultLogger) Log(message string)

func (*DefaultLogger) LogRequest

func (l *DefaultLogger) LogRequest(request RequestInfo)

func (DefaultLogger) LogResponse

func (l DefaultLogger) LogResponse(response ResponseInfo)

type Logger

type Logger interface {
	Log(message string)
	LogRequest(request RequestInfo)
	LogResponse(response ResponseInfo)
}

type RequestInfo

type RequestInfo struct {
	Method   string
	Url      string
	Protocol string
	Header   map[string][]string
	Body     []byte
}

func NewRequestInfo

func NewRequestInfo(method string, url string, protocol string, header map[string][]string, body []byte) *RequestInfo

type ResponseInfo

type ResponseInfo struct {
	StatusCode int
	Status     string
	Protocol   string
	Header     map[string][]string
	Body       []byte
}

func NewResponseInfo

func NewResponseInfo(statusCode int, status string, protocol string, header map[string][]string, body []byte) *ResponseInfo

Jump to

Keyboard shortcuts

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