Remove gRPC (debug) logging via corteza log facility
If needed, sufficiant logging can be achieved with enviromental variables: GRPC_GO_LOG_VERBOSITY_LEVEL=99 # GRPC_GO_LOG_SEVERITY_LEVEL=info # (error, warning, info, fatal)
This commit is contained in:
parent
b62992a2de
commit
f52ea84f65
@ -12,9 +12,6 @@ type (
|
||||
// Also used by corredor service to configure gRPC server
|
||||
Addr string `env:"CORREDOR_ADDR"`
|
||||
|
||||
// Also used by corredor service to enable logging
|
||||
Log bool `env:"CORREDOR_LOG_ENABLED"`
|
||||
|
||||
MaxBackoffDelay time.Duration `env:"CORREDOR_MAX_BACKOFF_DELAY"`
|
||||
|
||||
MaxReceiveMessageSize int `env:"CORREDOR_MAX_RECEIVE_MESSAGE_SIZE"`
|
||||
@ -46,7 +43,6 @@ func Corredor() (o *CorredorOpt) {
|
||||
DefaultExecTimeout: time.Minute,
|
||||
ListTimeout: time.Second * 2,
|
||||
ListRefresh: time.Second * 5,
|
||||
Log: false,
|
||||
|
||||
TlsCertEnabled: false,
|
||||
TlsCertPath: "/certs/corredor/client",
|
||||
|
||||
@ -8,14 +8,11 @@ import (
|
||||
"io/ioutil"
|
||||
"os"
|
||||
|
||||
"github.com/cortezaproject/corteza-server/pkg/app/options"
|
||||
"github.com/pkg/errors"
|
||||
"go.uber.org/zap"
|
||||
"go.uber.org/zap/zapgrpc"
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/credentials"
|
||||
"google.golang.org/grpc/grpclog"
|
||||
|
||||
"github.com/cortezaproject/corteza-server/pkg/app/options"
|
||||
)
|
||||
|
||||
// Corredor standard connector to Corredor service via gRPC
|
||||
@ -28,13 +25,6 @@ func NewConnection(ctx context.Context, opt options.CorredorOpt, logger *zap.Log
|
||||
return
|
||||
}
|
||||
|
||||
if opt.Log {
|
||||
// Send logs to zap
|
||||
//
|
||||
// waiting for https://github.com/uber-go/zap/pull/538
|
||||
grpclog.SetLogger(zapgrpc.NewLogger(logger.Named("grpc")))
|
||||
}
|
||||
|
||||
var (
|
||||
dialOpts = make([]grpc.DialOption, 0)
|
||||
|
||||
|
||||
@ -42,7 +42,6 @@ func TestNewConnection(t *testing.T) {
|
||||
|
||||
opt = options.CorredorOpt{
|
||||
Enabled: true,
|
||||
Log: testing.Verbose(),
|
||||
MaxBackoffDelay: 1,
|
||||
Addr: lstnr.Addr().String(),
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user