diff --git a/frontend/time.go b/frontend/time.go index 895107b5..ec6bf695 100644 --- a/frontend/time.go +++ b/frontend/time.go @@ -3,6 +3,7 @@ package main import ( "encoding/json" "fmt" + "log" "net/http" "time" ) @@ -19,6 +20,8 @@ type timeObject struct { } func (t TimeHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { + log.Printf("Handling %s request from %s: %s [%s]\n", r.Method, r.RemoteAddr, r.URL.Path, r.UserAgent()) + w.Header().Set("Content-Type", "application/json") if j, err := json.Marshal(timeObject{t.StartTime.Unix(), time.Now().Unix(), int(t.Duration.Seconds())}); err != nil {