// Start a round-robin VolumeManager with the volumes we have found.
KeepVM = MakeRRVolumeManager(goodvols)
- // Tell the built-in HTTP server to direct all requests to the REST
- // router.
- http.Handle("/", MakeRESTRouter())
+ // Tell the built-in HTTP server to direct all requests to the REST router.
+ loggingRouter := MakeLoggingRESTRouter()
+ http.HandleFunc("/", func(resp http.ResponseWriter, req *http.Request) {
+ loggingRouter.ServeHTTP(resp, req)
+ })
// Set up a TCP listener.
listener, err := net.Listen("tcp", listen)