Skip to content

Commit

Permalink
use request URI in log
Browse files Browse the repository at this point in the history
  • Loading branch information
mazay committed Feb 27, 2022
1 parent 58cf7c4 commit d53acc4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions service/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ package service
import (
"encoding/json"
"net/http"
"path"
"strconv"
"time"

Expand Down Expand Up @@ -83,7 +82,7 @@ func (rh *ReloadHandler) handler(res http.ResponseWriter, req *http.Request) {
func handlerWrapper(fn http.HandlerFunc) http.HandlerFunc {
return func(res http.ResponseWriter, req *http.Request) {
logger.Infof("%s - \"%s %s %s\" %s", req.RemoteAddr, req.Method,
path.Clean(req.URL.String()), req.Proto, strconv.FormatInt(req.ContentLength, 10))
req.URL.Path, req.Proto, strconv.FormatInt(req.ContentLength, 10))

res.Header().Set("Server", "s3sync-service"+"/"+version)
res.Header().Set("Content-Type", "application/json")
Expand Down

0 comments on commit d53acc4

Please sign in to comment.