filters

package
v0.0.0-...-f1c2737 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetContextLogger

func GetContextLogger(ctx context.Context) *log.Entry

func GetRequestContext

func GetRequestContext(req *restful.Request) context.Context

func JsonLoggingFilter

func JsonLoggingFilter(req *restful.Request, resp *restful.Response, chain *restful.FilterChain)

JsonLoggingFilter generates log lines for requests in JSON format.

func SetContextFilter

func SetContextFilter(req *restful.Request, resp *restful.Response, chain *restful.FilterChain)

SetContextFilter generates a RequestID for this request, and configures a logger with it in a field. Both are saved to a context.Context to be passed around, and is cached on the Request object as an Attribute.

Types

This section is empty.

Jump to

Keyboard shortcuts

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