Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultLoggingFunc ¶
DefaultLoggingFunc is default write log function
func Middleware ¶
func Middleware(config *Config) echo.MiddlewareFunc
Middleware echo write log middleware
Types ¶
type AccessLogField ¶
type AccessLogField struct { Type string `json:"type"` Status int `json:"status"` Method string `json:"method"` Path string `json:"path"` UserAgent string `json:"userAgent"` RemoteIP string `json:"remoteIp"` ForwardedFor string `json:"forwardedFor"` Elapsed int `json:"elapsed"` Error string `json:"error"` RequestID string `json:"requestId"` }
AccessLogField echo default log fields.
func ConvertAccessLogFieldByParameter ¶
func ConvertAccessLogFieldByParameter(param *Parameter) *AccessLogField
func (*AccessLogField) ToJSON ¶
func (a *AccessLogField) ToJSON() ([]byte, error)
ToJSON struct attributes to json
func (*AccessLogField) ToMap ¶
func (a *AccessLogField) ToMap() map[string]interface{}
ToMap struct attributes to map
type Config ¶
type Config struct { Skipper em.Skipper LoggingFunc LoggingFunc }
Config is Middleware config
type LoggingFunc ¶
LoggingFunc is write log function
Click to show internal directories.
Click to hide internal directories.