lessmore/node/logger.go

14 lines
248 B
Go
Raw Normal View History

2017-02-13 14:31:18 +03:00
package node
import (
"log"
"net/http"
"strings"
)
// LogRequest ...
func LogRequest(r *http.Request) {
logString := strings.Join([]string{r.Method, string(r.ContentLength), r.RequestURI, r.RemoteAddr}, " ")
log.Print("[API] ", logString)
}