Skip to content

Commit 19fb30e

Browse files
MHBauerkibbles-n-bytes
authored andcommitted
silence go-restful logging output (openshift#1622)
1 parent fdbabf0 commit 19fb30e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Diff for: test/integration/framework.go

+4
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,13 @@ import (
2020
"crypto/tls"
2121
"fmt"
2222
"io/ioutil"
23+
"log"
2324
"math/rand"
2425
"net/http"
2526
"testing"
2627
"time"
2728

29+
restfullog "github.com/emicklei/go-restful/log"
2830
"github.com/golang/glog"
2931

3032
"k8s.io/apimachinery/pkg/util/wait"
@@ -42,6 +44,8 @@ import (
4244

4345
func init() {
4446
rand.Seed(time.Now().UnixNano())
47+
// silence the go-restful webservices swagger logger
48+
restfullog.SetLogger(log.New(ioutil.Discard, "[restful]", log.LstdFlags|log.Lshortfile))
4549
}
4650

4751
type TestServerConfig struct {

0 commit comments

Comments
 (0)