瀏覽代碼

redirecting the internal logging of the vulcand/oxy to our /dev/null

Mohamed Al Ashaal 7 年之前
父節點
當前提交
fa6a08cecb
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      server.go

+ 3 - 0
server.go

@@ -4,10 +4,12 @@ import (
 	"context"
 	"crypto/tls"
 	"errors"
+	"io/ioutil"
 	"net/http"
 )
 
 import (
+	log "github.com/sirupsen/logrus"
 	"github.com/vulcand/oxy/forward"
 	"github.com/vulcand/oxy/roundrobin"
 	"github.com/vulcand/oxy/testutils"
@@ -32,6 +34,7 @@ func InitServer() error {
 		TLSConfig: &tls.Config{GetCertificate: m.GetCertificate},
 		Handler:   ServeHTTP(),
 	}
+	log.SetOutput(ioutil.Discard)
 	return s.ListenAndServeTLS("", "")
 }