lessmore/node/logger.go
2017-02-13 14:31:18 +03:00

14 lines
248 B
Go

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)
}