Documentation ¶
Overview ¶
Package log implements basic but useful request (access) logging middleware.
Index ¶
Constants ¶
View Source
const ( DefaultLogFilename = "access.log" CommonLogFormat = `{remote} ` + CommonLogEmptyValue + ` [{when}] "{method} {uri} {proto}" {status} {size}` CommonLogEmptyValue = "-" CombinedLogFormat = CommonLogFormat + ` "{>Referer}" "{>User-Agent}"` DefaultLogFormat = CommonLogFormat )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Logger ¶
type Logger struct { Next middleware.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.