Files

25 lines
565 B
Go

package logger
import "time"
// LogEntry 表示一次代理请求的完整记录。
type LogEntry struct {
RequestID string
Method string
Path string
Query string
ClientIP string
RequestHeaders []byte // JSON
RequestBody []byte
RequestTruncated bool
StatusCode int
ResponseHeaders []byte // JSON
ResponseBody []byte
ResponseTruncated bool
IsStream bool
LatencyMS int64
StartedAt time.Time
FinishedAt time.Time
Error string
}