lessmore/node/logger.go
2018-11-06 15:53:33 +03:00

15 lines
264 B
Go

package node
import (
"fmt"
"net/http"
log "github.com/Sirupsen/logrus"
)
// LogRequest ...
func LogRequest(r *http.Request) {
logString := fmt.Sprintf("%s %d %s %s", r.Method, r.ContentLength, r.RequestURI, r.RemoteAddr)
log.Print("[API] " + logString)
}