Documentation ¶
Overview ¶
Package logger implements logging middleware
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApacheCombined ¶ added in v1.5.4
func ApacheCombined(l *Middleware)
ApacheCombined sets format to Apache Combined Log. See http://httpd.apache.org/docs/2.2/logs.html#combined
func WithBody ¶ added in v1.4.0
func WithBody(l *Middleware)
WithBody triggers request body logging. Body size is limited (default 1k)
Types ¶
type Backend ¶ added in v1.2.0
type Backend interface {
Logf(format string, args ...interface{})
}
Backend is logging backend
type Middleware ¶
type Middleware struct {
// contains filtered or unexported fields
}
Middleware is a logger for rest requests.
type Option ¶
type Option func(l *Middleware)
Option func type
func MaxBodySize ¶
MaxBodySize sets size of the logged part of the request body.
Click to show internal directories.
Click to hide internal directories.