Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RequestFiberMiddlewareLogger ¶
func RequestFiberMiddlewareLogger(logger *logrus.Logger, excludedPrefix []string) func(*fiber.Ctx) error
RequestFiberMiddlewareLogger is a fiber middleware to log all requests with logrus It logs the incoming request and when request is completed, adding latency of the request
func RequestGorillaMuxMiddlewareLogger ¶
func RequestGorillaMuxMiddlewareLogger(logger *logrus.Logger, excludedPrefix []string) mux.MiddlewareFunc
RequestGorillaMuxMiddlewareLogger is a gorilla/mux middleware to log all requests with logrus It logs the incoming request and when request is completed, adding latency of the request
Types ¶
type HTTP ¶
type HTTP struct { Request *Request `json:"request,omitempty"` Response *Response `json:"response,omitempty"` }
HTTP is the struct of the log formatter.
type Host ¶
type Host struct { Hostname string `json:"hostname,omitempty"` ForwardedHost string `json:"forwardedHost,omitempty"` IP string `json:"ip,omitempty"` }
Host has the host information.
type Request ¶
type Request struct { Method string `json:"method,omitempty"` UserAgent map[string]interface{} `json:"userAgent,omitempty"` }
Request contains the items of request info log.
Click to show internal directories.
Click to hide internal directories.