proxy: add http logging

This commit is contained in:
Lan Tian
2020-06-01 23:26:33 +08:00
parent c42dfc80b8
commit 442e0df3a6
5 changed files with 15 additions and 13 deletions

View File

@@ -4,6 +4,8 @@ import (
"flag"
"net/http"
"os"
"github.com/gorilla/handlers"
)
// Check if a byte is character for number
@@ -60,5 +62,5 @@ func main() {
http.HandleFunc("/bird6", bird6Handler)
http.HandleFunc("/traceroute", tracerouteIPv4Wrapper)
http.HandleFunc("/traceroute6", tracerouteIPv6Wrapper)
http.ListenAndServe(*listenParam, nil)
http.ListenAndServe(*listenParam, handlers.LoggingHandler(os.Stdout, http.DefaultServeMux))
}