Home / Type/ LogFormatterParams Type — gin Architecture

LogFormatterParams Type — gin Architecture

Architecture documentation for the LogFormatterParams type/interface in logger.go from the gin codebase.

Entity Profile

Dependency Diagram

graph TD
  30be4933_9e72_3888_e10a_f78aaf8ddf7c["LogFormatterParams"]
  ed464f46_6294_af3d_9831_5646cd0d38c7["logger.go"]
  30be4933_9e72_3888_e10a_f78aaf8ddf7c -->|defined in| ed464f46_6294_af3d_9831_5646cd0d38c7
  style 30be4933_9e72_3888_e10a_f78aaf8ddf7c fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

logger.go lines 63–86

type LogFormatterParams struct {
	Request *http.Request

	// TimeStamp shows the time after the server returns a response.
	TimeStamp time.Time
	// StatusCode is HTTP response code.
	StatusCode int
	// Latency is how much time the server cost to process a certain request.
	Latency time.Duration
	// ClientIP equals Context's ClientIP method.
	ClientIP string
	// Method is the HTTP method given to the request.
	Method string
	// Path is a path the client requests.
	Path string
	// ErrorMessage is set if error has occurred in processing the request.
	ErrorMessage string
	// isTerm shows whether gin's output descriptor refers to a terminal.
	isTerm bool
	// BodySize is the size of the Response Body
	BodySize int
	// Keys are the keys set on the request's context.
	Keys map[any]any
}

Defined In

Frequently Asked Questions

What is the LogFormatterParams type?
LogFormatterParams is a type/interface in the gin codebase, defined in logger.go.
Where is LogFormatterParams defined?
LogFormatterParams is defined in logger.go at line 63.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free