Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
func NewLogger ¶
func NewLogger(logFunc func(format string, args ...interface{}), mode LoggerMode) *Logger
NewLogger returns a logger that logs HTTP requests and responses.
func (*Logger) LogFunc ¶
func (l *Logger) LogFunc() middleware.Logger
type LoggerMode ¶
type LoggerMode string
const ( URLLogMode LoggerMode = "url" HeadersLogMode LoggerMode = "headers" BodyLogMode LoggerMode = "body" ErrOnlyLogMode LoggerMode = "error" )
func ParseMode ¶
func ParseMode(val string) (LoggerMode, error)
func (LoggerMode) Validate ¶
func (m LoggerMode) Validate() error
Click to show internal directories.
Click to hide internal directories.