summaryrefslogtreecommitdiff
path: root/pkg/prxy/prxy.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/prxy/prxy.go')
-rw-r--r--pkg/prxy/prxy.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/pkg/prxy/prxy.go b/pkg/prxy/prxy.go
index 1e378b3d..809fdc19 100644
--- a/pkg/prxy/prxy.go
+++ b/pkg/prxy/prxy.go
@@ -2,13 +2,13 @@ package prxy
import (
"fmt"
- "log"
"net"
"net/http"
"net/http/httputil"
"net/url"
"github.com/xlgmokha/x/pkg/x"
+ xlog "gitlab.com/mokhax/spike/pkg/log"
)
func New(routes map[string]string) http.Handler {
@@ -21,7 +21,7 @@ func New(routes map[string]string) http.Handler {
Rewrite: func(r *httputil.ProxyRequest) {
host, _, err := net.SplitHostPort(r.In.Host)
if err != nil {
- log.Println(err)
+ xlog.WithFields(r.In, xlog.Fields{"error": err})
return
}
@@ -37,7 +37,7 @@ func New(routes map[string]string) http.Handler {
return nil
},
ErrorHandler: func(w http.ResponseWriter, r *http.Request, err error) {
- log.Println(err)
+ xlog.WithFields(r, xlog.Fields{"error": err})
},
}
}