Documentation ¶
Overview ¶
Package web is the web server of easeprobe.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewStructuredLogger ¶
NewStructuredLogger returns a new StructuredLogger
Types ¶
type AccessLog ¶
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 ¶
PlainFormatter is a plain text formatter
type StructuredLogger ¶
StructuredLogger is a simple, but powerful implementation of a custom structured logger backed on logrus.
func (*StructuredLogger) NewLogEntry ¶
func (l *StructuredLogger) NewLogEntry(r *http.Request) middleware.LogEntry
NewLogEntry creates a new logrus.Entry from the request
type StructuredLoggerEntry ¶
StructuredLoggerEntry is a logrus.Entry with some additional fields
func (*StructuredLoggerEntry) Panic ¶
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.