Merge pull request #8835 from gyuho/log

*: disable grpc client log in tests by default
This commit is contained in:
Gyu-Ho Lee 2017-11-08 10:23:53 -08:00 committed by GitHub
commit efb0057513
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 21 additions and 3 deletions

View File

@ -14,8 +14,14 @@
package integration
import "github.com/coreos/pkg/capnslog"
import (
"io/ioutil"
"github.com/coreos/pkg/capnslog"
"google.golang.org/grpc/grpclog"
)
func init() {
capnslog.SetGlobalLogLevel(capnslog.CRITICAL)
grpclog.SetLoggerV2(grpclog.NewLoggerV2(ioutil.Discard, ioutil.Discard, ioutil.Discard))
}

View File

@ -14,8 +14,14 @@
package ordering
import "github.com/coreos/pkg/capnslog"
import (
"io/ioutil"
"github.com/coreos/pkg/capnslog"
"google.golang.org/grpc/grpclog"
)
func init() {
capnslog.SetGlobalLogLevel(capnslog.CRITICAL)
grpclog.SetLoggerV2(grpclog.NewLoggerV2(ioutil.Discard, ioutil.Discard, ioutil.Discard))
}

View File

@ -14,10 +14,16 @@
package integration
import "github.com/coreos/pkg/capnslog"
import (
"io/ioutil"
"github.com/coreos/pkg/capnslog"
"google.golang.org/grpc/grpclog"
)
const defaultLogLevel = capnslog.CRITICAL
func init() {
capnslog.SetGlobalLogLevel(defaultLogLevel)
grpclog.SetLoggerV2(grpclog.NewLoggerV2(ioutil.Discard, ioutil.Discard, ioutil.Discard))
}