summary refs log tree commit diff stats
path: root/http.go
diff options
context:
space:
mode:
Diffstat (limited to 'http.go')
-rw-r--r--http.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/http.go b/http.go
index 2a733aa..4b6d460 100644
--- a/http.go
+++ b/http.go
@@ -43,6 +43,12 @@ func log200(r *http.Request) {
 	log.Printf("*** %v :: 200 :: %v %v\n", uip, r.Method, r.URL)
 }
 
+// log output for 400s
+func log400(w http.ResponseWriter, r *http.Request, err error) {
+	uip := getIPFromCtx(r.Context())
+	log.Printf("*** %v :: 400 :: %v %v :: %v\n", uip, r.Method, r.URL, err)
+}
+
 // log output for 404s
 func log404(w http.ResponseWriter, r *http.Request, err error) {