logging

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RequestReader

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

RequestReader defines a request reader used to parse the request information so it can be correctly sent to the logger.

func NewRequestReader

func NewRequestReader(model interface{}) (*RequestReader, error)

NewRequestReader will instantiate a new request event context reader decorator used to parse the request body and add the parsed content into the logging data.

func (*RequestReader) Get

func (r *RequestReader) Get(c servletrest.GinContext) map[string]interface{}

Get process the context request.

type ResponseReader

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

ResponseReader defines a response reader used to parse the response information so it can be correctly sent to the logger. It will also remove/omit the body information on a response with the expected status code

func NewResponseReader

func NewResponseReader(statusCode int, model interface{}) (*ResponseReader, error)

NewResponseReader will instantiate a new response event context reader decorator used to parse the response body and add the parsed content into the logging data.

func (*ResponseReader) Get

func (r *ResponseReader) Get(c servletrest.GinContext) map[string]interface{}

Get process the context response.

Jump to

Keyboard shortcuts

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