Documentation ¶
Overview ¶
Package log implements request (access) logging middleware.
Index ¶
Constants ¶
View Source
const ( // DefaultLogFilename is the default log filename. DefaultLogFilename = "access.log" // CommonLogFormat is the common log format. CommonLogFormat = `{remote} ` + CommonLogEmptyValue + " " + CommonLogEmptyValue + ` [{when}] "{method} {uri} {proto}" {status} {size}` // CommonLogEmptyValue is the common empty log value. CommonLogEmptyValue = "-" // CombinedLogFormat is the combined log format. CombinedLogFormat = CommonLogFormat + ` "{>Referer}" "{>User-Agent}"` // DefaultLogFormat is the default log format. DefaultLogFormat = CommonLogFormat )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Entry ¶
type Entry struct { Format string Log *httpserver.Logger }
Entry represents a log entry under a path scope
type Logger ¶
type Logger struct { Next httpserver.Handler Rules []*Rule ErrorFunc func(http.ResponseWriter, *http.Request, int) // failover error handler }
Logger is a basic request logging middleware.
Click to show internal directories.
Click to hide internal directories.