Documentation
¶
Index ¶
- func GetRequestRecordInfo(reqCtx context.Context) (ret struct{ ... })
- func MarkLogLevelTrace(resp http.ResponseWriter, req *http.Request)
- func MarkLongPolling() types.PreMiddlewareProvider
- func NewRequestInfoHandler() func(next http.Handler) http.Handler
- func RecordFuncInfo(ctx context.Context, funcInfo *FuncInfo) (end func())
- func UpdatePanicError(ctx context.Context, err error)
- type Event
- type FuncInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetRequestRecordInfo ¶
func MarkLogLevelTrace ¶
func MarkLogLevelTrace(resp http.ResponseWriter, req *http.Request)
func MarkLongPolling ¶
func MarkLongPolling() types.PreMiddlewareProvider
MarkLongPolling marks the request is a long-polling request, and the logger may output different message for it
func NewRequestInfoHandler ¶
NewRequestInfoHandler is a handler that saves request info into request context. If router logger is enabled, it will also print request logs and detect slow requests.
func RecordFuncInfo ¶
RecordFuncInfo records a func info into context
func UpdatePanicError ¶
UpdatePanicError updates a context's error info, a panic may be recovered by other middlewares, but we still need to know that.
Types ¶
type FuncInfo ¶
type FuncInfo struct {
// contains filtered or unexported fields
}
FuncInfo contains information about the function to be logged by the router log
func GetFuncInfo ¶
GetFuncInfo returns the FuncInfo for a provided function and friendlyname
Click to show internal directories.
Click to hide internal directories.