swarm/tracing: disable stdout logging for opentracing (#17931)

This commit is contained in:
Anton Evangelatov 2018-10-17 14:46:59 +02:00 committed by GitHub
parent 4466c7b971
commit 4e693ad5a6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -9,7 +9,6 @@ import (
"github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/log"
jaeger "github.com/uber/jaeger-client-go" jaeger "github.com/uber/jaeger-client-go"
jaegercfg "github.com/uber/jaeger-client-go/config" jaegercfg "github.com/uber/jaeger-client-go/config"
jaegerlog "github.com/uber/jaeger-client-go/log"
cli "gopkg.in/urfave/cli.v1" cli "gopkg.in/urfave/cli.v1"
) )
@ -85,13 +84,13 @@ func initTracer(endpoint, svc string) (closer io.Closer) {
// Example logger and metrics factory. Use github.com/uber/jaeger-client-go/log // Example logger and metrics factory. Use github.com/uber/jaeger-client-go/log
// and github.com/uber/jaeger-lib/metrics respectively to bind to real logging and metrics // and github.com/uber/jaeger-lib/metrics respectively to bind to real logging and metrics
// frameworks. // frameworks.
jLogger := jaegerlog.StdLogger //jLogger := jaegerlog.StdLogger
//jMetricsFactory := metrics.NullFactory //jMetricsFactory := metrics.NullFactory
// Initialize tracer with a logger and a metrics factory // Initialize tracer with a logger and a metrics factory
closer, err := cfg.InitGlobalTracer( closer, err := cfg.InitGlobalTracer(
svc, svc,
jaegercfg.Logger(jLogger), //jaegercfg.Logger(jLogger),
//jaegercfg.Metrics(jMetricsFactory), //jaegercfg.Metrics(jMetricsFactory),
//jaegercfg.Observer(rpcmetrics.NewObserver(jMetricsFactory, rpcmetrics.DefaultNameNormalizer)), //jaegercfg.Observer(rpcmetrics.NewObserver(jMetricsFactory, rpcmetrics.DefaultNameNormalizer)),
) )