Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMiddleware ¶
func NewMiddleware(logger AccessLogger) func(http.Handler) http.Handler
Types ¶
type AccessLogger ¶
func NewAccessLogger ¶
func NewAccessLogger(name string, opts Options) (AccessLogger, error)
type Entry ¶
type Entry struct {
Username string
Latency time.Duration
ClientIP string
Request Request
Response Response
}
func (*Entry) MarshalZerologObject ¶
type JsonLogger ¶
type JsonLogger struct {
// contains filtered or unexported fields
}
func NewJsonLogger ¶
func NewJsonLogger(name string, writer io.Writer) *JsonLogger
type TextLogger ¶
type TextLogger struct {
// contains filtered or unexported fields
}
func NewTextLogger ¶
func NewTextLogger(name string, writer io.Writer, colored bool) *TextLogger
Click to show internal directories.
Click to hide internal directories.