mirror of
https://gitee.com/XM-GO/PandaX.git
synced 2026-05-13 23:22:10 +08:00
15
kit/ginx/log_handler.go
Normal file
15
kit/ginx/log_handler.go
Normal file
@@ -0,0 +1,15 @@
|
||||
package ginx
|
||||
|
||||
type LogInfo struct {
|
||||
LogResp bool // 是否记录返回结果
|
||||
Description string // 请求描述
|
||||
}
|
||||
|
||||
func NewLogInfo(description string) *LogInfo {
|
||||
return &LogInfo{Description: description, LogResp: false}
|
||||
}
|
||||
|
||||
func (i *LogInfo) WithLogResp(logResp bool) *LogInfo {
|
||||
i.LogResp = logResp
|
||||
return i
|
||||
}
|
||||
Reference in New Issue
Block a user