Documentation ¶
Overview ¶
Package web is the web server of easeprobe.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewStructuredLogger ¶ added in v1.5.0
NewStructuredLogger returns a new StructuredLogger
Types ¶
type AccessLog ¶ added in v1.5.0
type AccessLog struct { RemoteAddr string `json:"remote_addr"` UserID string `json:"user_id"` Time string `json:"time"` Method string `json:"method"` Request string `json:"request"` Status string `json:"status"` Bytes string `json:"bytes"` Elapsed string `json:"elapsed"` Referrer string `json:"referrer"` UserAgent string `json:"user_agent"` Stack string `json:"stack"` Panic string `json:"panic"` }
AccessLog is the default access log format
type PlainFormatter ¶ added in v1.5.0
PlainFormatter is a plain text formatter
type StructuredLogger ¶ added in v1.5.0
StructuredLogger is a simple, but powerful implementation of a custom structured logger backed on logrus.
func (*StructuredLogger) NewLogEntry ¶ added in v1.5.0
func (l *StructuredLogger) NewLogEntry(r *http.Request) middleware.LogEntry
NewLogEntry creates a new logrus.Entry from the request
type StructuredLoggerEntry ¶ added in v1.5.0
StructuredLoggerEntry is a logrus.Entry with some additional fields
func (*StructuredLoggerEntry) Panic ¶ added in v1.5.0
func (l *StructuredLoggerEntry) Panic(v interface{}, stack []byte)
Panic is a convenience method for Logrus
Click to show internal directories.
Click to hide internal directories.