Documentation
¶
Index ¶
- func Logger(next http.Handler) http.Handler
- type Backend
- type Flag
- type Middleware
- type Option
- func Flags(flags ...Flag) Option
- func IPfn(ipFn func(ip string) string) Option
- func Log(log Backend) Option
- func MaxBodySize(max int) Option
- func Prefix(prefix string) Option
- func SubjFn(userFn func(r *http.Request) (string, error)) Option
- func UserFn(userFn func(r *http.Request) (string, error)) Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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 for logging rest requests
type Option ¶
type Option func(l *Middleware)
Option func type
func MaxBodySize ¶
MaxBodySize functional option defines the largest body size to log.
Click to show internal directories.
Click to hide internal directories.