format the time like httpd mod_config_log %t (time.RFC1123Z)

This commit is contained in:
Vincent Batts 2013-07-10 13:52:10 -04:00
parent 86164b6fee
commit a7023cee3a

View file

@ -55,7 +55,7 @@ func LogRequest(r *http.Request, statusCode int) {
fmt.Printf("%s - - [%s] \"%s %s\" \"%s\" %d %d\n", fmt.Printf("%s - - [%s] \"%s %s\" \"%s\" %d %d\n",
addr, addr,
time.Now(), time.Now().Format(time.RFC1123Z),
r.Method, r.Method,
r.URL.String(), r.URL.String(),
user_agent, user_agent,