Documentation ¶
Index ¶
Constants ¶
const ( // ApacheCommonLogFormat is the Apache Common Log directives ApacheCommonLogFormat = "%h %l %u %t \"%r\" %>s %b" // ApacheCombinedLogFormat is the Apache Combined Log directives ApacheCombinedLogFormat = "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\"" )
Variables ¶
var ApacheCombinedLog = Format(ApacheCombinedLogFormat)
ApacheCombinedLog will log HTTP requests using the Apache Combined Log format
var ApacheCommonLog = Format(ApacheCommonLogFormat)
ApacheCommonLog will log HTTP requests using the Apache Common Log format
Functions ¶
func Format ¶
Format accepts a format string using Apache formatting directives and returns a function accepting internal option functions which then returns a function that can handle standard HTTP middleware. This function more convenient to use when saving formatting to a variable, then using with standard HTTP middleware
func FormatWith ¶
FormatWith accepts a format string using Apache formatting directives with option functions and returns a function that can handle standard HTTP middleware.
func WithOutput ¶
WithOutput sets the io.Writer output for the log file.
Types ¶
This section is empty.