Documentation ¶
Index ¶
Constants ¶
View Source
const ( // LogPattern is format for writing the logRecord LogPattern = "%s - - [%s] \"%s\" %d %d %s \"%s\" \"%s\"\n" // DateTimeFormat is for logging Date and Time of request DateTimeFormat = "02/Jan/2006 15:04:05" // Minimal )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type LogRecord ¶
type LogRecord struct { http.ResponseWriter // contains filtered or unexported fields }
LogRecord struct extends http.ResponseWriter interface which has different methods included in it.
func (*LogRecord) Log ¶
Log method to be called for logging to "out"
func (*LogRecord) Write ¶
Write method has been extended to record the bytes written or the content length
type LoggingHandler ¶
type LoggingHandler struct {
// contains filtered or unexported fields
}
LoggingHandler is to be used as wrapper of mux.
func (LoggingHandler) ServeHTTP ¶
func (h LoggingHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
Click to show internal directories.
Click to hide internal directories.