Documentation ¶
Index ¶
- func GetContextLogger(ctx context.Context) *log.Entry
- func GetRequestContext(req *restful.Request) context.Context
- func JsonLoggingFilter(req *restful.Request, resp *restful.Response, chain *restful.FilterChain)
- func SetContextFilter(req *restful.Request, resp *restful.Response, chain *restful.FilterChain)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetRequestContext ¶
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.
Click to show internal directories.
Click to hide internal directories.