15 lines
264 B
Go
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)
|
|
}
|