git » kxd » commit 01bb94d

Make the http server log errors to our logger

author Alberto Bertogli
2014-07-11 22:30:38 UTC
committer Alberto Bertogli
2014-07-11 22:30:38 UTC
parent 5c5e005b4920eca480d3d7f7abc819419c64a3b6

Make the http server log errors to our logger

This patch tells the http server to use our logger to report errors. In
particular, this makes TLS errors appear properly in the logs.

Note this requires Go 1.3.

Signed-off-by: Alberto Bertogli <albertito@blitiri.com.ar>

kxd/kxd.go +1 -0

diff --git a/kxd/kxd.go b/kxd/kxd.go
index f5521e7..db235a9 100644
--- a/kxd/kxd.go
+++ b/kxd/kxd.go
@@ -228,6 +228,7 @@ func main() {
 	server := http.Server{
 		Addr:      listenAddr,
 		TLSConfig: &tlsConfig,
+		ErrorLog:  logging,
 	}
 
 	http.HandleFunc("/v1/", HandlerV1)