logger

package
v1.1.11 Latest Latest
Warning

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

Go to latest
Published: May 13, 2024 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Default = new(DefaultLogger)
	Debug   = new(DebugLogger)
)

Functions

This section is empty.

Types

type DebugLogger

type DebugLogger struct{}

func (DebugLogger) DebugPrintError

func (l DebugLogger) DebugPrintError(err error)

func (DebugLogger) DebugPrintGetRequest

func (l DebugLogger) DebugPrintGetRequest(url string)

func (DebugLogger) DebugPrintPostJSONRequest

func (l DebugLogger) DebugPrintPostJSONRequest(url string, body []byte)

func (DebugLogger) DebugPrintPostMultipartRequest

func (l DebugLogger) DebugPrintPostMultipartRequest(url string, body []byte)

func (DebugLogger) DebugPrintStringResponse

func (l DebugLogger) DebugPrintStringResponse(str string)

func (DebugLogger) DecodeJSON added in v1.1.1

func (l DebugLogger) DecodeJSON(body []byte, v interface{}) error

type DefaultLogger

type DefaultLogger struct{}

func (DefaultLogger) DebugPrintError

func (l DefaultLogger) DebugPrintError(err error)

func (DefaultLogger) DebugPrintGetRequest

func (l DefaultLogger) DebugPrintGetRequest(url string)

func (DefaultLogger) DebugPrintPostJSONRequest

func (l DefaultLogger) DebugPrintPostJSONRequest(url string, body []byte)

func (DefaultLogger) DebugPrintPostMultipartRequest

func (l DefaultLogger) DebugPrintPostMultipartRequest(url string, body []byte)

func (DefaultLogger) DebugPrintStringResponse

func (l DefaultLogger) DebugPrintStringResponse(str string)

func (DefaultLogger) DecodeJSON added in v1.1.1

func (l DefaultLogger) DecodeJSON(body []byte, v interface{}) error

type Logger

type Logger interface {
	DebugPrintError(err error)
	DebugPrintStringResponse(str string)
	DebugPrintGetRequest(url string)
	DebugPrintPostJSONRequest(url string, body []byte)
	DebugPrintPostMultipartRequest(url string, body []byte)
	DecodeJSON(body []byte, v interface{}) error
}

Jump to

Keyboard shortcuts

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